Posts

Showing posts with the label Alpha IN/OUT to Handle Leading Zeros in SAP ABAP

BAPI for material storage location Add

 We can add material storage location plant wise using third party app or web. BAPI names : BAPI_MATERIAL_MAINTAINDATA_RT Import parameters: HEADDATA: Material Tables: STORAGELOCATIONDATA: Material: Plant: STGE_LOC:   STORAGELOCATIONDATAX: Material: Plant: STGE_LOC:   use below code after completing steps. CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.        

Alpha IN/OUT to Handle Leading Zeros in SAP ABAP

 In SAP we use SHIFT keyword to delete leading zero's. Keyword is: SHIFT Variable LEFT DELETING LEADING '0'.  SHIFT Variable RIGHT DELETING LEADING '0'. We can also delete & add these zero's using new ABAP syntax. FM:  'CONVERSION_EXIT_ALPHA_OUTPUT' 'CONVERSION_EXIT_ALPHA_INPUT' DATA int_val TYPE char10 VALUE '0000012345' . DATA Chng_val TYPE char10. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = int_val IMPORTING output = Chng_val. Final result: 12345    DATA Chng_val TYPE char10 VALUE '12345' . DATA int_val TYPE char10. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING input = Chng_val IMPORTING output = int_val.  Final result:  0000012345