2006 Jan 08 11:57 AM
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
2006 Jan 08 12:04 PM
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
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
2006 Jan 08 12:04 PM
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
2006 Jan 08 1:05 PM
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
2006 Jan 08 1:16 PM
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
2006 Jan 08 2:40 PM
Thank you suresh.
'MESSAGE_TEXT_BUILD' logic is worked and BDC is working.
Full points alloted
cheers
kaki
2006 Jan 08 6:52 PM
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.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |