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: 

Unique problem Screen is not Getting data populated from BDC_DATA itab

Former Member
0 Kudos

Hi Gurus,

I have an unique problem, I have an custom transaction (module pool) and which first runs an ALV report displays an QM Records, There is an command button at the top of the report to create new defect, where i provide the Material Number, Supplier and Defect Code, and then if i press create it should navigate to standard transaction QM01 and It should create a new defect code.

Issue:

The recording runs fine till providing Material Number, Supplier and Defect Code of ZTCODE when it navigates to QM01, the whole executions just stops, i dont know why it is moving ahead. If i try to skip and come out of standard transaction also no improvement and all manually i should come out.

Comparision with recording Made in ZTCODe and QM01.

If i record the same activity directly with QM01 and if i try to run the recording, it runs perfectly.

if i am trying to record it through Z module pool where it will navigate to standard transaction code QM01, it stops when it reaches QM01, i am getting this error. i dont know why.

I have attached the code for your reference, kindly suggest me what can be the problem.

MY CODE:

perform bdc_dynpro using 'ZQRPCCOMEX_NEW_SWCB' '1000'.

perform bdc_field using 'BDC_OKCODE'

'=FC_DEFC'.

perform bdc_field using 'P_VAR'

'/VEHICLEPROJ'.

perform bdc_field using 'BDC_CURSOR'

'S_NITG-LOW'.

perform bdc_field using 'S_QMDAT-LOW'

'03.09.2010'.

perform bdc_field using 'S_QMDAT-HIGH'

'03.03.2011'.

perform bdc_dynpro using 'ZQRPCCOMEX_NEW_SWCB' '1000'.

perform bdc_field using 'BDC_OKCODE'

'=ONLI'.

perform bdc_field using 'P_VAR'

'/DEFECT_CODE'.

perform bdc_field using 'BDC_CURSOR'

'S_NITG2-LOW'.

perform bdc_field using 'S_NITG2-LOW'

'G22C'.

perform bdc_dynpro using 'SAPLSLVC_FULLSCREEN' '0500'.

perform bdc_field using 'BDC_OKCODE'

'=NEW_DC'.

perform bdc_dynpro using 'ZQRPCCOMEX_NEW_SWCB' '9507'.

perform bdc_field using 'BDC_CURSOR'

'W_SCR_REFNUM'.

perform bdc_field using 'BDC_OKCODE'

'=OK'.

perform bdc_field using 'W_SCR_MATNR'

'G22C'.

perform bdc_field using 'W_SCR_LIFNR'

'220947-00'.

perform bdc_field using 'W_SCR_REFNUM'

'C_DEF_11'.

                                                                                                                                                      • it is not executing from here these screens belongs to QM01, it stops the whole execution

*****************************************************************************************************************************************************

perform bdc_dynpro using 'SAPLIQS0' '7200'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'BDC_CURSOR'

'RQM00-MAWERK'.

perform bdc_field using 'RQM00-MAWERK'

'CTT'.

perform bdc_field using 'VIQMEL-QMCOD'

'0120'.

perform bdc_dynpro using 'SAPLIQS0' '7200'.

perform bdc_field using 'BDC_OKCODE'

'=BUCH'.

perform bdc_field using 'BDC_CURSOR'

'RQM00-MAWERK'.

perform bdc_field using 'RQM00-MAWERK'

'CTT'.

perform bdc_field using 'VIQMEL-QMCOD'

'0120'.

perform bdc_dynpro using 'SAPLSLVC_FULLSCREEN' '0500'.

perform bdc_field using 'BDC_OKCODE'

'=&F12'.

perform bdc_dynpro using 'ZQRPCCOMEX_NEW_SWCB' '1000'.

perform bdc_field using 'BDC_OKCODE'

'/EECAN'.

perform bdc_transaction using 'ZM11'.

The screen gets hanged up in the QM01 screen and where the mandatory fields are not getting populated and thats it execution is not happening at any screens if i am trying to come out of transaction.

Assumption - Correct me if iam wrong.

There can be complication while calling a Ztcode (module Pool) which in turns calls a Standard Tcode.

Thanks & Regards,

S.Saravanan

3 REPLIES 3

Former Member
0 Kudos

I am curious as to why your requirement is designed like this? Why do you need a BDC program to go through your custom transaction which calls a ALV report and that report calls a QM01? Are you not making this way too complicated?

You are going to anyway create a Z report to do a BDC on your custom Z report... instead of that why don't you just directly create a Z program to do BDC on QM01 (also look for BAPI if available).

0 Kudos

Hi ,

Like only through Z transaction code we can create Defect code be created as Reference in Reference Field of QM01, through QM01 i can give only notification number has reference.

Thanks & Regards,

S.Saravanan

Former Member
0 Kudos

HI,

Check the recording i think the recording does not contain the initial screen i.e SAPLIQS0 200.

Re record the bdc or just add the initial screen in the BDC

perform bdc_dynpro using 'SAPLIQS0' '200'.

perform bdc_field using 'RIWO00-QMART' 'Q!' " What ever notification type u have

perform bdc_field using 'BDC_OKCODE' '/00'.

This will sove ur problem .

Regards,

Madhukar Shetty