Posts

Showing posts from July, 2019

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'.        

Serial Number in SAP ALV report

In sap there are multiple types of report , ALV is one of them.Today I am sharing my real life experience with you.I faced lots of problem to solve it but at last I did it with out having any problem. One of my report functional people gave me a requirement where serial Number column is allocated. But in ALV serial no is not referenced,better to ignore coz when you need to sort it then the serial number sequence is not maintain, that's the bad impact of it. At the very first time I declared a variable and then control it in my final internal table and modify my internal table.  Like: Data: Slno type i. Slno = 0. Loop at itab into wa.  Slno = Slno + 1. wa-Slno = Slno. modify itab from wa. Endloop. Another way is very simple ,just take a variable and assign sy-tabix, your work is done. Data: Slno type i. Loop at itab into wa. Slno = sy-tabix wa-Slno = Slno. Endloop. If it helps you then give me a feedback, your feedback boost me a lot.

Sort Internal Table

Sometimes we need to sort our internal table based on functional requirement. We can sort it like : Ascending , Descending , text or Alphabetically. Syntax like : Sort itab Ascending. or sort itab by field_name  Ascending Sort itab Descending  or sort itab by field_name  Descending Sort itab by field_name.

Minus Sign Position change in SAP ABAP.

In sap by default minus sign display in the right side of the field. In case if users demands to change its position then need to use FM to fulfill the requirement. In  below example is given: Functional Module : CLOI_PUT_SIGN_IN_FRONT Report: Sign_Position_change. Parameter : Number1 type I,                    Number2 type I. Data : Sum type I,           Change_Sign(15) type I. Sum = Number1 + Number2. Change_Sign = Sum. CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT' CHANGING Value = Change_sign. Write: / 'After Shifting: ',Change_sign.