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

OPEN PROGRAM

Former Member
0 Likes
759

Hi all

I have a requirement such that once i double clic on the output it should skip the first screen and go n open the program directly from SE38.I know how to take it to SE38 but from there how to pass on the program name.Please help.

REPORT ZPRE_6.

TABLES:BSEG.

DATA:ITAB LIKE STANDARD TABLE OF BSEG WITH HEADER LINE.

PARAMETERS:p_WERKS TYPE BSEG-WERKS.

Select * From bseg into corresponding fields of table itab up to 10 rows where werks = p_werks .

Loop at itab.

Write:/ itab-werks,itab-wrbtr.

endloop.

AT LINE-SELECTION.

Call transaction 'SE38' and skip first screen.

SET PARAMETER ID 'ZPRE_6.

END-OF-SELECTION.

With Regards

Vijay

1 ACCEPTED SOLUTION
Read only

vinod_vemuru2
Active Contributor
0 Likes
698

Hi Vijay,

Then we have to put this piece of code. Just copy paste this code and let me know if it works for. It is working for me.


REPORT  z75694.
WRITE 'Test'.
DATA: bdcdata TYPE TABLE OF bdcdata,
           wa TYPE bdcdata.

AT LINE-SELECTION.
  CLEAR wa.
  wa-program = 'SAPLWBABAP'.
  wa-dynpro = '0100'.
  wa-dynbegin = 'X'.
  APPEND wa TO bdcdata.

  CLEAR wa.
  wa-fnam = 'BDC_OKCODE'.
  wa-fval = '=SHOP'.
"This is ok code for display. U can use OK code for change
"mode also.
  APPEND wa TO bdcdata.

  CLEAR wa.
  wa-fnam = 'RS38M-PROGRAMM'.
  wa-fval = 'Z75694A'. 
"Here pass ur program name(Can  be dynamic also.
  APPEND wa TO bdcdata.

  CALL TRANSACTION 'SE38' USING bdcdata MODE 'E'.

This will show the code in display mode. If u want in change mode then change the BDCOK code accordingly.

Thanks,

Vinod.

Edited by: Vinod Kumar Vemuru on May 22, 2008 12:08 PM

6 REPLIES 6
Read only

Former Member
0 Likes
698

Hi,

TABLES:BSEG,rs38m.

DATA:ITAB LIKE STANDARD TABLE OF BSEG WITH HEADER LINE.

PARAMETERS _WERKS TYPE BSEG-WERKS.

Select * From bseg into corresponding fields of table itab up to 10 rows where werks = p_werks .

Loop at itab.

Write:/ itab-werks,itab-wrbtr.

endloop.

AT LINE-SELECTION.

rs38m-program = 'ZPRE_6'.

Call transaction 'SE38' and skip first screen.

SET PARAMETER ID 'RID' field rs38m-programm.

END-OF-SELECTION.

Regards,

Jagadish

Read only

nikhil_chitre
Active Participant
0 Likes
698

Hi,

Try using

set PARAMETER ID 'RID' field 'ZPRE_6'

Regards,

Nikhil

Read only

vinod_vemuru2
Active Contributor
0 Likes
698

Hi Vijay check below code.


AT LINE-SELECTION.
SET PARAMETER ID 'RID' FIELD 'ZPRE_6'.
CALL TRANSACTION 'SE38' AND SKIP FIRST SCREEN.

Thanks,

Vinod.

Read only

0 Likes
698

Hi vinod

Its not opening the program.Any help for opening the code?

Read only

vinod_vemuru2
Active Contributor
0 Likes
699

Hi Vijay,

Then we have to put this piece of code. Just copy paste this code and let me know if it works for. It is working for me.


REPORT  z75694.
WRITE 'Test'.
DATA: bdcdata TYPE TABLE OF bdcdata,
           wa TYPE bdcdata.

AT LINE-SELECTION.
  CLEAR wa.
  wa-program = 'SAPLWBABAP'.
  wa-dynpro = '0100'.
  wa-dynbegin = 'X'.
  APPEND wa TO bdcdata.

  CLEAR wa.
  wa-fnam = 'BDC_OKCODE'.
  wa-fval = '=SHOP'.
"This is ok code for display. U can use OK code for change
"mode also.
  APPEND wa TO bdcdata.

  CLEAR wa.
  wa-fnam = 'RS38M-PROGRAMM'.
  wa-fval = 'Z75694A'. 
"Here pass ur program name(Can  be dynamic also.
  APPEND wa TO bdcdata.

  CALL TRANSACTION 'SE38' USING bdcdata MODE 'E'.

This will show the code in display mode. If u want in change mode then change the BDCOK code accordingly.

Thanks,

Vinod.

Edited by: Vinod Kumar Vemuru on May 22, 2008 12:08 PM

Read only

0 Likes
698

Hi vinod..

Its working fine....Thanks a lot

Vijay