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

Skip first screen and return using BDC

Former Member
0 Likes
4,898

Hi,

I am calling a Transaction from an ALV REPORT ,i wanted to set the material number in that transaction, i checked using f1 help and found the parameter id as 'MAT' .

But when i am calling the transaction,the material number is not being displayed,Hence i modified the code below..

My Previous code:

READ TABLE alv_stb INDEX i_selfield-tabindex.

IF sy-subrc = 0.

SET PARAMETER ID 'MAT' FIELD alv_stb-idnrk.

CALL TRANSACTION 'TCODE' .

ENDIF.

...................................................................

My CURRENT CODE :

PERFORM bdc_dynpro USING 'XXX_/2L3_BOM_XX'

'1000'.

PERFORM bdc_field USING 'BDC_CURSOR'

'PA_MATNR'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=ONLI'.

PERFORM bdc_field USING 'PA_MATNR'

alv_stb-idnrk.

PERFORM bdc_field USING 'PA_STLAN'

alv_stb-xtlan .

CALL TRANSACTION 'TCODE '

USING bdcdata

MODE 'E'

UPDATE 'S' .

Requirement :

I need to skip the first screen ,This is working ( screen is skiped) Now when i want to come back from the Transaction to my alv report,by pressing back button..this first screen which i skipped is being displayed, which i dont need...how to skip that screen,when pressing F3 from transaction or back button.

7 REPLIES 7
Read only

Former Member
0 Likes
2,179

CALL TRANSACTION <tcod> [AND SKIP FIRST SCREEN] [USING <itab>].

This statement saves the data of the calling program, and starts transaction <tcod>. At the end of the transaction, the system returns to the statement following the call in the calling report

The addition AND SKIP FIRST SCREEN allows you to prevent the initial screen of the new transaction from being displayed. The first screen to be displayed is then the specified Next screen in the screen attributes of the initial screen. If the first screen calls itself as the next screen, you cannot skip it.

Furthermore, the AND SKIP FIRST SCREEN option works only if all mandatory fields on the initial screen of the new transaction are filled completely and correctly with input values from SPA/GPA parameters.

Read only

Former Member
0 Likes
2,179

shafiq,

SET PARAMETER ID 'MAT' FIELD alv_stb-idnrk.

CALL TRANSACTION 'IW53' AND SKIP FIRST SCREEN.

Don't forget to reward if useful....

Read only

0 Likes
2,179

Hi,

SET PARAMETER ID IS NOT WORKING...THATS WHY I TRIED THE OTHER ALTERNATIVE

Read only

0 Likes
2,179

hi,

u cant use skip first screen and using BDCDATA both at same time....

FORM user_command USING u_com LIKE sy-ucomm sel_field TYPE slis_selfield.

CLEAR fcat1.

CASE u_com.

WHEN '&IC1'.

READ TABLE itab INDEX sel_field-tabindex.

IF sy-subrc = 0.

t_mat = itab-matnr.

SET PARAMETER ID 'MAT' FIELD t_mat.

CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.

ENDIF.

ENDCASE.

ENDFORM. "user_command

reward if usefull....

Read only

Former Member
0 Likes
2,179

Hi,

i doubt with this syntax , can we use additions after using skip first screen

CALL TRANSACTION 'TCODE ' AND

SKIP FIRST SCREEN USING bdcdata

MODE 'E'

UPDATE 'S' .

Error Message :

' Expected after screen '

Read only

Former Member
0 Likes
2,179

hi shafiq

&----


*& Form zf_user_command

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM ZF_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM

RS_SELFIELD TYPE SLIS_SELFIELD .

CASE R_UCOMM. "FCODE

WHEN '&IC1'. "for hotspot with MATNR.

IF RS_SELFIELD-FIELDNAME = 'MATNR'.

SET PARAMETER ID 'MAT' FIELD RS_SELFIELD-VALUE.

CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.

RETURN.

MESSAGE I103 WITH RS_SELFIELD-VALUE .

ENDIF.

message - material no 'X' shown succesfully

ENDCASE.

ENDFORM. " zf_user_command

if it's not taking code..

delete form..endform..and call it again it might be giving a problem with the old form endform... just try if nothing else works

the above given logic is fine and working

reward poitns if helpful

Rohan

Read only

0 Likes
2,179

Hi

You can also include the exit part of the BDC code in the bdcdata table, like

* --------------------------- Execute report ---------------------------
  bdchead it_bdc l_progr '1000'.
  bdc     it_bdc 'BDC_OKCODE'   '=ONLI'. " Execute report

* ------------------- End report when user is done ---------------------
  bdchead it_bdc l_progr '1000'.
  bdc     it_bdc 'BDC_OKCODE'   '/EE'. " Exit report