Application Development and Automation 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: 
Read only

Update Transaction(IQS2) using BDC

Former Member
0 Likes
602

Hi All,

I am developing BAPI (using BDC) which creates quality notification in SAP which is entered via front end web application. Structure p_qmsm contain 3 lines of task in notification. The code is as given below. To avoid problem of large no of lines on screen,code lines starting with * is used. This actually for pagedown after entering every 2 lines and creates new line. so that 2 lines always push up on screen and there will not be problem for creating large no of lines on screen

perform bdc_dynpro using 'SAPLIQS0' '7200'.
perform bdc_field using 'BDC_OKCODE' '=10\TAB11'.

LOOP AT p_qmsm INTO wa_qmsm.

perform bdc_dynpro using 'SAPLIQS0' '7204'.
perform bdc_field using 'BDC_OKCODE' '/00'.

CONCATENATE 'VIQMSM-QSMNUM(' wa_qmsm_cntr ')' INTO wm_qmsm_qsmnum.
CONCATENATE 'VIQMSM-MNGRP(' wa_qmsm_cntr ')' INTO wm_qmsm_mngrp.
CONCATENATE 'VIQMSM-MNCOD(' wa_qmsm_cntr ')' INTO wm_qmsm_mncod.
CONCATENATE 'VIQMSM-MATXT(' wa_qmsm_cntr ')' INTO wm_qmsm_matxt.
CONCATENATE 'VIQMSM-PSTER(' wa_qmsm_cntr ')' INTO wm_qmsm_pster.
CONCATENATE 'VIQMSM-PETER(' wa_qmsm_cntr ')' INTO wm_qmsm_peter.

perform bdc_field using wm_qmsm_qsmnum wa_qmsm-qsmnum.
perform bdc_field using wm_qmsm_mngrp wa_qmsm-mngrp.
perform bdc_field using wm_qmsm_mncod wa_qmsm-mncod.
perform bdc_field using wm_qmsm_matxt wa_qmsm-matxt.
perform bdc_field using wm_qmsm_pster wa_qmsm_pster.
perform bdc_field using wm_qmsm_peter wa_qmsm_peter.

wa_qmsm_cntr = wa_qmsm_cntr + 01.
ENDLOOP.

CALL TRANSACTION 'IQS2' USING wt_bdc
MODE 'N'
UPDATE 'A'
MESSAGES INTO P_MESSTAB.

The same code is used in modify mode also. web application is sending all 3 lines in modify mode even if single line is modified. It is already decided to send all rows back from web application to SAP in same sequence. It is working fine if i comment 5 lines which is starting with *. But in modify mode, how can i ensure that correct row is modified? and how can i achieve problem of large no of lines on screen?

Please suggest?

Edited by: Rob Burbank on Dec 14, 2009 3:20 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
552

Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code. And please do not try to get around this by using two posts. I was able to re-format this by simply removing your commented out code.

Hi All,

I am developing BAPI (using BDC) which creates quality notification in SAP which is entered via front end web application. Structure p_qmsm contain 3 lines of task in notification. The code is as given below. To avoid problem of large no of lines on screen,code lines starting with * is used. This actually for pagedown after entering every 2 lines and creates new line. so that 2 lines always push up on screen and there will not be problem for creating large no of lines on screen

perform bdc_dynpro using 'SAPLIQS0' '7200'.
perform bdc_field using 'BDC_OKCODE' '=10\TAB11'.

LOOP AT p_qmsm INTO wa_qmsm.

perform bdc_dynpro using 'SAPLIQS0' '7204'.
perform bdc_field using 'BDC_OKCODE' '/00'.

CONCATENATE 'VIQMSM-QSMNUM(' wa_qmsm_cntr ')' INTO wm_qmsm_qsmnum.
CONCATENATE 'VIQMSM-MNGRP(' wa_qmsm_cntr ')' INTO wm_qmsm_mngrp.
CONCATENATE 'VIQMSM-MNCOD(' wa_qmsm_cntr ')' INTO wm_qmsm_mncod.
CONCATENATE 'VIQMSM-MATXT(' wa_qmsm_cntr ')' INTO wm_qmsm_matxt.
CONCATENATE 'VIQMSM-PSTER(' wa_qmsm_cntr ')' INTO wm_qmsm_pster.
CONCATENATE 'VIQMSM-PETER(' wa_qmsm_cntr ')' INTO wm_qmsm_peter.

perform bdc_field using wm_qmsm_qsmnum wa_qmsm-qsmnum.
perform bdc_field using wm_qmsm_mngrp wa_qmsm-mngrp.
perform bdc_field using wm_qmsm_mncod wa_qmsm-mncod.
perform bdc_field using wm_qmsm_matxt wa_qmsm-matxt.
perform bdc_field using wm_qmsm_pster wa_qmsm_pster.
perform bdc_field using wm_qmsm_peter wa_qmsm_peter.

wa_qmsm_cntr = wa_qmsm_cntr + 01.
ENDLOOP.

CALL TRANSACTION 'IQS2' USING wt_bdc
MODE 'N'
UPDATE 'A'
MESSAGES INTO P_MESSTAB.

The same code is used in modify mode also. web application is sending all 3 lines in modify mode even if single line is modified. It is already decided to send all rows back from web application to SAP in same sequence. It is working fine if i comment 5 lines which is starting with *. But in modify mode, how can i ensure that correct row is modified? and how can i achieve problem of large no of lines on screen?

Please suggest?

Edited by: Rob Burbank on Dec 14, 2009 3:20 PM

2 REPLIES 2
Read only

Former Member
0 Likes
553

Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code. And please do not try to get around this by using two posts. I was able to re-format this by simply removing your commented out code.

Read only

0 Likes
552

Thanks for this. But that commented out code was required and explain the same in problem.