05-05-2009 8:26 AM
Hi Friends,
I am using standard BAPI (BAPI_MATERIAL_SAVEDATA) to create Material Master. There is no option to select plant view in headdata itself but i need to populate plant data. So i've used PLANTDATA and PLANTDATAX parameter to pass plant name,storage location and period indicator.
say
PLANTDATA-plantname = '0011'.
PLANTDATA-storagelocation = '0011'.
PLANTDATA-periodind = 'D'.
PLANTDATAX-plantname = '0011'.
PLANTDATAX-storagelocation = 'X'.
PLANTDATAX-periodind = 'X'.
The material gets created but plant view is not created.
<<text removed>>
Thanks in advance.
Regards,
Prabhu
Edited by: Matt on May 5, 2009 11:15 AM - don't use ASAP
05-05-2009 8:39 AM
Hello,
Try this
Data:
PLANTDATA LIKE BAPI_MARC, "ins H 592229
PLANTDATAX LIKE BAPI_MARCX, "ins H 592229
Get plant
IF FT-FNAM = 'RM03M-WERKS'. "ins H 592229
PLANTDATA-PLANT = FT-FVAL. "ins H 592229
PLANTDATAX-PLANT = FT-FVAL. "ins H 592229
ENDIF.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA' "ins H 592229
EXPORTING "ins H 592229
HEADDATA = HEADDATA "ins H 592229
CLIENTDATA = CLIENTDATA "ins H 592229
CLIENTDATAX = CLIENTDATAX "ins H 592229
PLANTDATA = PLANTDATA "ins H 592229
PLANTDATAX = PLANTDATAX "ins H 592229
IMPORTING "ins H 592229
RETURN = RETURN_CODE2 "ins H 592229
TABLES "ins H 592229
MATERIALDESCRIPTION = MATERIALDESCRIPTION. "ins H 592229
Check this standard one is using in the same way
see this program MMCP3FP0
05-05-2009 8:41 AM
In the header data 'BAPIMATHEAD' check the Basic View and try out.
05-05-2009 9:49 AM
Guys,
I tried in the same way as u said but it didn't get updated!! Any other idea?
Regards,
Prabhu
05-05-2009 10:15 AM
>
> Hope u guys help me out ASAP.
Phrases such as ASAP are not permitted. They are seen by many as rather rude - implying that your question is somehow more important than anyone elses.
05-05-2009 10:35 AM