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: 

at line selection and call transaction

Former Member
0 Kudos
386

Hi,

my program is given below.In that i used call transaction.If i double click that one,it is going to that

transcation.but it is going for selection screen in that transaction.I dont want that selection screen.

according to docno it has to be executed.For that how i have to write code in that one.

tables : ztrack.

types : begin of ty_ztrack,

serno type ztrack-serno,

DOCNO type ztrack-DOCNO,

PACK_SLIP type ztrack-PACK_SLIP,

BUDAT type ztrack-BUDAT,

MOVETYPE type ztrack-MOVETYPE,

DCNO type ztrack-dcno,

VENDOR type ztrack-vendor,

VEHINO type ztrack-VEHINO,

end of ty_ztrack.

data : it_ztrack type table of ty_ztrack with header line.

parameters : s_docno like ztrack-docno.

parameters : s_budat like ztrack-budat.

start-of-selection.

if not s_budat is initial.

select * from ztrack into corresponding fields of table it_ztrack

where budat = s_budat.

endif.

loop at it_ztrack.

write : / it_ztrack-serno,it_ztrack-docno,it_ztrack-pack_slip,

it_ztrack-budat,it_ztrack-movetype,it_ztrack-dcno,it_ztrack-vendor,

it_ztrack-vehino.

hide : it_ztrack-docno.

endloop.

at line-selection.

CALL TRANSACTION 'ZRTP_PRINT'.

11 REPLIES 11

Former Member
0 Kudos
180

Hi bathri

just use

CALL TRANSACTION 'ZRTP_PRINT' AND SKIP FIRST SCREEN.

Pushpraj

0 Kudos
180

This is my calling transaction

TABLES: ZTRACK,

KNA1,

MAKT,

MSEG,

M_DEBID,

MKPF.

DATA: BEGIN OF ITAB OCCURS 0,

PACK_SLIP LIKE ZTRACK-PACK_SLIP,

SERINO LIKE ZTRACK-SERNO,

DOCNO LIKE ZTRACK-DOCNO,

BUDAT LIKE ZTRACK-BUDAT,

VENDOR LIKE ZTRACK-VENDOR,

VEHINO LIKE ZTRACK-VEHINO,

VEN_NAM LIKE KNA1-NAME1,

KUNNR LIKE MSEG-KUNNR,

MATNR LIKE MSEG-MATNR,

MAKTX LIKE MAKT-MAKTX,

MENGE LIKE MSEG-MENGE,

MOVETYPE LIKE ZTRACK-MOVETYPE,

NAME LIKE KNA1-NAME1,

meins like mseg-meins,

END OF ITAB.

DATA : TTAB LIKE ITAB OCCURS 3 WITH HEADER LINE.

DATA : TEMP LIKE ITAB.

DATA NM LIKE ITAB-NAME.

DATA: VEN_NAM LIKE TTAB-NAME,

STRAS LIKE KNA1-STRAS,

ORT01 LIKE KNA1-ORT01,

DOCNO LIKE ZTRACK-DOCNO,

DDATE LIKE ZTRACK-BUDAT,

VEHINO like itab-VEHINO.

SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

PARAMETERS: S_DOCNO LIKE ZTRACK-DOCNO ."OBLIGATORY.

*parameters : s_budat like ztrack-budat.

SELECTION-SCREEN: END OF BLOCK B1.

START-OF-SELECTION.

PERFORM DISPLAY.

DATA SERINO LIKE SY-DBCNT.

*&----


*

*& Form DISPLAY

*&----


*

  • text

*----


*

FORM DISPLAY.

SELECT * FROM ZTRACK INTO CORRESPONDING FIELDS OF TABLE TTAB

WHERE DOCNO EQ S_DOCNO.

IF SY-SUBRC NE '0'.

MESSAGE : E001(ZSAM).

ENDIF.

LOOP AT TTAB.

SELECT * FROM MSEG WHERE MBLNR EQ TTAB-DOCNO

AND BWART IN ('951' , '952').

SELECT SINGLE * FROM KNA1 WHERE kunnr EQ TTAB-VENDOR.

SELECT SINGLE * FROM MAKT WHERE MATNR EQ MSEG-MATNR.

MOVE TTAB TO ITAB.

SERINO = SERINO + 1.

ITAB-SERINO = SERINO.

MOVE: TTAB-VENDOR TO ITAB-VENDOR,

TTAB-DOCNO TO DOCNO,

TTAB-BUDAT TO DDATE,

    • mseg-werks to itab-werks,

    • mseg-lgort to itab-lgort,

KNA1-NAME1 TO VEN_NAM,

KNA1-STRAS TO STRAS,

KNA1-ORT01 TO ORT01,

TTAB-VEHINO TO VEHINO,

MSEG-MATNR TO ITAB-MATNR,

MAKT-MAKTX TO ITAB-MAKTX,

mseg-meins to itab-meins,

MSEG-MENGE TO ITAB-MENGE.

APPEND ITAB.

ENDSELECT.

ENDLOOP.

  • uline /(92)

skip 5.

WRITE:/ ' RRR Ltd.,'.

SKIP.

WRITE:/ ' Returnable Gate Pass'.

SKIP 2.

DATA: SO(25), PS(25), S1(3).

WRITE: / ' From' , ' RRR Ltd.', ' To ',55 VEN_NAM.

WRITE: / ' 1435' ,'Sipcot',55 stras.

WRITE: / ' HOSUR.',55 ort01.

  • IF STRAS IS NOT INITIAL.

  • WRITE: / , ' ', 55 STRAS.

  • ENDIF.

*

  • IF ORT01 IS NOT INITIAL.

  • WRITE: / , ' ',55 ORT01.

  • ENDIF.

SKIP 2.

write: / ' Material Document No. :', docno.

write: / ' Material Document Date :', ddate.

write: / ' Material Vehicle No. :', VEHINO.

skip.

  • write : / sy-uline(90).

uline /3(82).

WRITE:/3 sy-vline,'Item No',13 sy-vline, 15 'Part No.',30 sy-vline, 32 'Part Description', 65 sy-vline, 67 'Quantity', 78 sy-vline,

80 'UOM', 84 sy-vline.

uline /3(82).

LOOP AT ITAB.

S1 = S1 + 1.

WRITE: /3 sy-vline, S1, 13 sy-vline, 15 ITAB-MATNR, 30 sy-vline, 32 ITAB-MAKTX, 65 sy-vline, 67 ITAB-MENGE left-justified, 78 sy-vline, 80 itab-meins,

84 sy-vline.

ENDLOOP.

uline /3(82).

skip 2.

Write: /3 'Place : Hosur', 65 'Sent by'.

Write: /3 'Date :', Sy-datum.

write: /65 'Stores'.

ENDFORM. "DISPLAY

former_member588853
Active Contributor
0 Kudos
180

hi,

syntax.

CALL TRANSACTION 'XXX" and skip first screen.

dont forget to pass the data to selection screen using set parameter.

syntax: SET PARAMETER ID pid FIELD dobj. " PID you can get it in dataelement of the field.

Set this berfore call transaction.

If there is no parameter id for the field,

You can use the

Submit 'Programname' via selection screen.

regards,

nazeer

former_member242255
Active Contributor
0 Kudos
180

instead of calling the custom transaction ZRTP_PRINT,

you can submit the program linked to the above transactuion by pasing the required data.

use SUBMIT statement.

Regards,

Sravan

Former Member
0 Kudos
180

Hi,

First populate your selection screen with the document number

SET PARAMETER ID  'DOC' FIELD it_ztrack-docno " --> use the parameter id from your selection screen

Use CALL TRANSACTION 'ZRTP_PRINT' AND SKIP FIRST SCREEN.

Former Member
0 Kudos
180

Hi,

CALL TRANSACTION 'ZRTP_PRINT' AND SKIP FIRST SCREEN.

This is the only way you wish to perform.

Ensure that the selection screen fields in transaction have Parameter IDs attached to them.

Before calling the transaction you should do SET PARAMETER ID 'XXX' with appropriate values for all the fields. then you should do CALL TRANSACTION......

Former Member
0 Kudos
180

Hi,

Follow the 2 steps.

1. Pass all the mandatory / required parameters to the Parameter ids of the variables on the first screen of the tcode.

2. Use the syntac call <TCODE> and skip first screen.

-Raj

Former Member
0 Kudos
180
AT line-selection.
Set Parameter ID 'PARAMETER ID' for field it_ztrack-docno.
CALL TRANSACTION 'ZRTP_PRINT' and skip first screen..

Note :You will get Parameter id from:

GOTO>SE11>Open the data Element for DOCNO-->Further characteristic tab

Or Check in TPARA TABLE

Hope this will resolve the issue

Regards,

Gurpreet

0 Kudos
180

in the second program i used parameters : s_docno.iN THE FIRST screen if i double click docno

automatically it should display.There are more docno in the first screen.

0 Kudos
180

All the replies above point to simple steps that you need to follow.

Please go through above replies and do accordingly in your program and it will work.

If you still cannot get it working then ask any further meaningful questions.

Former Member
0 Kudos
180

Thanks for all who have given replies