Wednesday, June 18, 2008

SAP Availability Check BAPI/Function Module

SAP Availability Check BAPI/Function Module

If you need to check the availability of a Material using a program, then you can make use of the following BAPI.

SAP Availability check BAPI
BAPI_MATERIAL_AVAILABILITY
__________________________________

This BAPI returns the Available quantity.

The code given below shows how to call this BAPI. The import parameters of this BAPI are

Material
Plant
Unit
________________________


REPORT ZEX_AVAILIBILITYCHK .

Parameter: p_matnr like BAPIMATVP-MATNR,
           p_werks like BAPIMATVP-WERKS,
           p_unit  like BAPIADMM-UNIT.

*Data: int_wmdvsx like BAPIWMDVS occurs 0 with header line,
*      int_wmdvex like BAPIWMDVE occurs 0 with header line.

Data: int_wmdvsx  type table of bapiwmdvs with header line,
      int_wmdvex  type table of bapiwmdve with header line,
      d_WKBST like BAPICM61V-WKBST.



           CALL FUNCTION 'BAPI_MATERIAL_AVAILABILITY'
             EXPORTING
               PLANT                    = p_werks
               MATERIAL                 = p_matnr
               UNIT                     = p_unit
*              CHECK_RULE               =
*              STGE_LOC                 =
*              BATCH                    =
*              CUSTOMER                 =
*              DOC_NUMBER               =
*              ITM_NUMBER               =
*              WBS_ELEM                 =
*              STOCK_IND                =
*              DEC_FOR_ROUNDING         =
*              DEC_FOR_ROUNDING_X       =
*              READ_ATP_LOCK            =
*              READ_ATP_LOCK_X          =
            IMPORTING
*              ENDLEADTME               =
               AV_QTY_PLT               = d_WKBST
*              DIALOGFLAG               =
*              RETURN                   =
             TABLES
               WMDVSX                   = int_wmdvsx
               WMDVEX                   = int_wmdvex
                     .


Write:/ d_WKBST.

 If sy-subrc = 0.

 endif.


Creating a Valid Password in SAP

Creating a Valid Password in SAP

Find below some useful tips for creating a new Password in SAP.

  • Length of the SAP Password has to be in the range of 3 to 8 Characters
  • If you are changing the password, then the new password should not be a replica of any of the last 5 passwords
  • Password should not be the reserved words pass or init
  • SAP Password cannot be a blank space
  • The first 3 characters of a Password cannot be the same for example nnnewp
  • As mentioned in the first point a password cannot be less then 3 characters eg. fl
  • Password cannot contain an exclamation mark !file
  • SAP Password cannot contain a question mark eg. ?mypass
  • The password can be any combination of alphanumeric characters including a to z, 0 to 9 and punctuation marks
When ever you are logging on to the SAP system for the first time, you need to enter a new password. It is always a good practice to change the password every month. Many companies have a Password Policy and you need to follow these policies strictly.
__________________________________________________________________

See Also: Function Module to Generate SAP Password