Skip to Content
0
Former Member
Dec 09, 2008 at 11:52 AM

error in BDC for Tcode IB02

46 Views

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