2010 Nov 13 6:46 AM
how to use bapi BAPI_MATERIAL_SAVEDATA in bdc i dont know how to use my prob is i want to upload material description in mm02 my text file is like
materialno language description
20001 AR A123
20001 CA b123
20002 AR A123
2002 CA b123
pls help me
how to use bapi BAPI_MATERIAL_SAVEDATA in bdc i dont know how to use my prob is i want to upload material description in mm02 my text file is like
materialno language description
20001 AR A123
20001 CA b123
20002 AR A123
2002 CA b123
pls help me
2010 Nov 13 7:06 AM
Hi Jadav,
After uploading the data, pass the parameters as described :
"Will take your first line as example
DATA : WA_HEADDATA LIKE BAPIMATHEAD,
RETURN LIKE BAPIRET2.
IT_MATERIALDESCRIPTION TYPE TABLE OF BAPI_MAKT WITH HEADER LINE.
*----------------------------------------------------------------------*
* Selection of Views
*----------------------------------------------------------------------*
WA_HEADDATA-BASIC_VIEW = 'X'.
***********************************************************************
* Fill Header data *
***********************************************************************
WA_HEADDATA-MATERIAL = '20001'."Pass Material No here
***********************************************************************
* Fill Material Description *
***********************************************************************
IT_MATERIALDESCRIPTION-MATL_DESC = 'A123'."Pass Material Description here
IT_MATERIALDESCRIPTION-LANGU = 'AR'."Language here
APPEND IT_MATERIALDESCRIPTION.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
HEADDATA = WA_HEADDATA
IMPORTING
RETURN = RETURN
TABLES
MATERIALDESCRIPTION = IT_MATERIALDESCRIPTION
I tested this code here & it works.
Thanks & Regards,
Faheem.
2010 Nov 13 7:41 AM
2010 Nov 13 7:43 AM
my recording is like
perform open_group.
LOOP AT ITAB INTO WA_ITAB.
CLEAR BDCDATA.
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MATNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RMMG1-MATNR'
WA_ITAB-MATNR.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
'X'.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'=ZU01'.
perform bdc_field using 'BDC_CURSOR'
'MAKT-MAKTX'.
perform bdc_field using 'MAKT-MAKTX'
'Ball Vlv 1"-300#,Flng,A216 Gr.WCB,LO,F'
& 'TG'.
perform bdc_field using 'MARA-MEINS'
'EA'.
perform bdc_field using 'MARA-MATKL'
'YBR08'.
perform bdc_field using 'MARA-BISMT'
'VBFGB030L0250'.
perform bdc_field using 'MARA-SPART'
'14'.
perform bdc_field using 'MARA-MTPOS_MARA'
'NORM'.
perform bdc_field using 'MARA-BRGEW'
'1'.
perform bdc_field using 'MARA-GEWEI'
'KG'.
perform bdc_field using 'MARA-NTGEW'
'1'.
perform bdc_dynpro using 'SAPLMGMM' '4300'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'SKTEXT-MAKTX(02)'.
perform bdc_field using 'SKTEXT-SPRAS(02)'
WA_ITAB-SPRAS.
*perform bdc_field using 'SKTEXT-SPRAS(03)'
* 'BG'.
*perform bdc_field using 'SKTEXT-SPRAS(04)'
* 'CS'.
perform bdc_field using 'SKTEXT-MAKTX(02)'
WA_ITAB-MAKTX.
perform bdc_dynpro using 'SAPLMGMM' '4300'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_field using 'BDC_CURSOR'
'SKTEXT-SPRAS(04)'.
perform bdc_transaction using 'MM02'.
ENDLOOP.perform close_group.
Edited by: jadav_avani on Nov 13, 2010 8:44 AM
2010 Nov 13 7:53 AM
Hi Jadav,
You have posted Message Subject as BAPI and you are posting code of BDC!. You want to do that by BAPI or BDC?
but how to increment my cursor value.
I could not get you what you want to say.
If you want to use BAPI then you can use above code which I have given you in my above post. Loop at your final Internal table and pass Material no,Language & Description. System will update accordingly.
Thanks & Regards,
Faheem.
2010 Nov 13 8:49 AM
2010 Nov 13 8:06 AM
HI,
BAPI or BDC?
Maybe you have to get help.sap.com on what a bapi is... BAPI basically is a function module non a call transaction.
Regards,
Ivan
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |