‎2013 Apr 24 11:04 AM
Hi ,
I'm a beginner to ABAP so I need some help from you experts.
This is my scenario .
" First I've to get materials from the plant & storage location using BAPI_MATERIAL_GETLIST.
The output has to in the below data : material, matl_desc and this output result has to be saved in an internal table XYZ".
It would be better if I get the ans in Steps or in sequential manner.
‎2013 Apr 25 9:07 AM
Hi suhas,
First fill up the selection details in the bapi to reterive the materials,
then get the material details in the table and populate into your internal table XYZ..
DATA: MATNRLIST TYPE TABLE OF BAPIMATLST,
PLANTSELECTION TYPE TABLE OF BAPIMATRAW.
PLANTSELECTION-SIGN = 'I'
PLANTSELECTION-OPTION = 'EQ'
PLANTSELECTION-LOW = '1000'
APPEND PLANTSELECTION.
like this fillup your selection and pass it to the bapi
Call bapi BAPI_MATERIAL_GETLIST
TABLES
PLANTSELECTION = PLANTSELECTION
....
MATNRLIST = MATNRLIST
and you will get the list of materials in the MATNRLIST internal table...
loop MATNRLIST and move the data to your internal table if required...
Before you doing this, understand the flow and structures of the BAPI then it would be easier to do..
‎2013 Apr 25 9:07 AM
Hi suhas,
First fill up the selection details in the bapi to reterive the materials,
then get the material details in the table and populate into your internal table XYZ..
DATA: MATNRLIST TYPE TABLE OF BAPIMATLST,
PLANTSELECTION TYPE TABLE OF BAPIMATRAW.
PLANTSELECTION-SIGN = 'I'
PLANTSELECTION-OPTION = 'EQ'
PLANTSELECTION-LOW = '1000'
APPEND PLANTSELECTION.
like this fillup your selection and pass it to the bapi
Call bapi BAPI_MATERIAL_GETLIST
TABLES
PLANTSELECTION = PLANTSELECTION
....
MATNRLIST = MATNRLIST
and you will get the list of materials in the MATNRLIST internal table...
loop MATNRLIST and move the data to your internal table if required...
Before you doing this, understand the flow and structures of the BAPI then it would be easier to do..