Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BDC problem

Former Member
0 Kudos

Hi,

I have developed a BDC program for QA12 in Call transaction.Normally i need to pass around 10 records at once.

While iam giving mode 'A' the data is getting saved(pressing enter,enter..)

But if i give mode 'N' data is not getting saved(not passed into screen fields).

What might be the reason? Do i need to give some thing like "WAIT UP TO 12 SECONDS" ?

Points guaranteed

cheers

kaki

1 ACCEPTED SOLUTION

Lakshmant1
Active Contributor
0 Kudos

Hi Kaki,

Check the recording(SHDB) once again by checking the checkbox simulate background mode, as there will be difference in foreground and background execution.

Thanks

Lakshman

5 REPLIES 5

Lakshmant1
Active Contributor
0 Kudos

Hi Kaki,

Check the recording(SHDB) once again by checking the checkbox simulate background mode, as there will be difference in foreground and background execution.

Thanks

Lakshman

0 Kudos

Hi,

Every thing is looks fine.Still the data is not getting saved in mode 'N'. This is my code.Where might be the error?


FORM PROCESS_BDC.

  LOOP AT T_CAT.
    REFRESH BDCDATA.

    PERFORM BDC_DYNPRO      USING 'SAPMQEVA' '0100'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                  'QALS-PRUEFLOS'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '/00'.
    PERFORM BDC_FIELD       USING 'QALS-PRUEFLOS'
                                   T_CAT-PRUEFLOS.

    PERFORM BDC_DYNPRO      USING 'SAPMQEVA' '0200'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                  'RQEVA-VCODE'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '=BB'.

    PERFORM BDC_FIELD       USING 'RQEVA-VCODE'
                                   T_CAT-VCODE.
    PERFORM BDC_FIELD       USING 'RQEVA-VCODEGRP'
                                   T_CAT-VCODEGRP.
    PERFORM BDC_FIELD       USING 'RQEVA-QKENNZAHL'
                                   T_CAT-QKENNZAHL.

    PERFORM BDC_DYNPRO      USING 'SAPMQEVA' '0200'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                  'RQEVA-VCODE'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '=ENTE'.

    G_QTY = T_CAT-LOSMENGE.
    CONDENSE G_QTY.

    PERFORM BDC_DYNPRO      USING 'SAPMQEVA' '0200'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                  'RQEVA-VMENGE01'.
<b>    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                '=BU'.</b> 
                            this is for  saveing the data

    PERFORM BDC_FIELD       USING 'RQEVA-VMENGE01'
                                   G_QTY.


    CALL TRANSACTION 'QA12' USING BDCDATA
       MODE 'N' UPDATE 'S' MESSAGES INTO MESSTAB.

  ENDLOOP.

ENDFORM.                    "BDC_FIELDS


0 Kudos

Hi Kaki,

Did you check if the MESSTAB is filled with any error messages? You can use the delivered function module

'MESSAGE_TEXT_BUILD' to get the text of the message.Dont ask me why but sometimes pressing enter twice does help in BDCs ie repeat the following statement in your routine.

PERFORM BDC_FIELD using 'BDC_OKCODE' '=ENTE'.

Regards,

Suresh Datti

Message was edited by: Suresh Datti

0 Kudos

Thank you suresh.

'MESSAGE_TEXT_BUILD' logic is worked and BDC is working.

Full points alloted

cheers

kaki

Former Member
0 Kudos

A thumb rule: never use mode "N" before you finished the programming - always mode "E" (stops on error and displays the problematic screen with the system error).

If it's not running as a Job, leave the "E" mode even for Production since you never know what might happen during the Batch-input process and many times users knows how to fix issues that happen during the Batch-input process.

enjoy.

ayal.