2008 Dec 09 11:52 AM
Hi all
I have written the code for deleting Line item and re-inserting that line item (for particulat Material) for IB02 using BDC.
i am able to delete that line item but it is giving error while re-inserting that line item.It is giving error as " Field RC29-POSTP(3) does not exits on the screenSAPLCSDI 0140".If i commected that line it is giving error for another field. I tried so many times, but no use Plz Plz help me out
LOOP AT equn_itab INTO w_equn_itab.
CLEAR count.
PERFORM bdc_dynpro USING 'SAPLCSDI' '0200'.
PERFORM bdc_field USING 'RC29N-EQUNR' w_equn_itab-equnr.
PERFORM bdc_field USING 'RC29N-WERKS' w_equn_itab-werks.
PERFORM bdc_field USING 'RC29N-STLAN' w_equn_itab-stlan
.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
PERFORM bdc_dynpro USING 'SAPLCSDI' '0150'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
LOOP AT stpo_itab INTO w_stpo_itab WHERE stlnr = w_equn_itab-stlnr.
count = count + 1.
READ TABLE mara_itab INTO W_MARA_ITAB WITH KEY matnr = w_stpo_itab-idnrk
.
IF SY-SUBRC EQ 0.
CONCATENATE 'RC29P-AUSKZ(' count ')' INTO v_string.
PERFORM bdc_field USING 'BDC_CURSOR'
v_string.
PERFORM bdc_field USING v_string 'X'.
CLEAR v_string.
ENDIF.
ENDLOOP.
clear v_string.
PERFORM bdc_dynpro USING 'SAPLCSDI' '0150'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=FCDL'.
PERFORM bdc_dynpro USING 'SAPLCSDI' '0150'.
PERFORM bdc_field USING 'BDC_OKCODE' '=FCNP'.
PERFORM bdc_dynpro USING 'SAPLCSDI' '0140'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
LOOP AT stpo2_itab INTO w_stpo2_itab WHERE stlnr = w_equn_itab-stlnr.
READ TABLE mara_itab INTO W_MARA_ITAB WITH KEY matnr = w_stpo_itab-idnrk
.
concatenate 'RC29-IDNRK(' C ')' INTO V_STRING.
perform bdc_field using 'BDC_CURSOR'
V_STRING.
perform bdc_field using V_STRING
'1688'.
CLEAR v_string.
concatenate 'RC29-MENGE(' C ')' INTO V_STRING.
perform bdc_field using V_STRING
W_STPO2_ITAB-MENGE.
CLEAR v_string.
concatenate 'RC29-MEINS(' C ')' INTO V_STRING.
perform bdc_field using V_STRING
W_STPO2_ITAB-MEINS.
CLEAR v_string.
READ TABLE MARC_ITAB INTO W_MARC_ITAB WITH KEY MATNR =
W_STPO2_ITAB-IDNRK.
READ TABLE zmrp_bom_itab INTO W_zmrp_bom_itab WITH KEY DISPO =
W_MARC_ITAB-DISPO.
CONCATENATE 'RC29-POSTP(' C ')' INTO V_STRING.
perform bdc_field using V_STRING
W_zmrp_bom_itab-POSTP.
C = C + 1.
ENDLOOP.
CLEAR C.
PERFORM bdc_dynpro USING 'SAPLCSDI' '0140'.
PERFORM bdc_field USING 'BDC_OKCODE' '=FCBU'.
PERFORM bdc_dynpro USING 'SAPLCSDI' '0150'.
PERFORM bdc_field USING 'BDC_OKCODE' '=FCBU'.
PERFORM bdc_dynpro USING 'SAPLCSDI' '0130'.
PERFORM bdc_field USING 'BDC_OKCODE' '=FCBU'.
PERFORM bdc_dynpro USING 'SAPLCSDI' '0130'.
PERFORM bdc_field USING 'BDC_OKCODE' '/EENDE'.
PERFORM bdc_calltransaction USING c_ib02.
Thanks in advance
Regards
Rao
hi,
Generally we get these kind of problems if the field value is not captured properly in recording.
Do the recording again and change it in program.
2008 Dec 09 11:54 AM
hi,
Generally we get these kind of problems if the field value is not captured properly in recording.
Do the recording again and change it in program.
2008 Dec 09 11:55 AM
Hi,
CONCATENATE 'RC29-POSTP(0' C ')' INTO V_STRING.Value would be 03 & not 3.
Best regards,
Prashant
2008 Dec 09 12:10 PM
Hi Prashant,
its not 3 its 03 olny i checked in recording, i have done this recording so many time but i am not able to do this.
regards
Rao
2008 Dec 09 12:18 PM
Hi,
The structure is not RC29 but RC29P-POSNR.
Also if u get similar error for other fields, then change RC29 to RC29P.
Best regards,
Prashant
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |