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: 

calling transaction from report by passing multiple values ??

Former Member
0 Kudos

Dear Experts,

I am working on a report which dispalys an ALV report for all shipment and delivery related data.

Now the problem is that on the output(ALV OUTPUT), whenever I select a row or rows and click on a push button , then it should take me to transaction Vl02n with the Delivery number from the alv output and the output type which may or maynot be given on the selction screen.How to do this so that when i call the transaction vl02n the value of delivery number passed from alv

(and not the selction screen)and the output type passed from selection screen appears on the corresponding fields of the selection screen of tcode(vl02n)??

Also the second problem is that, if i have to call such a transaction from my alv report output and will have to skip the selection screen of the called transaction and just dispaly the result, what should i do??

Thanks in advance.

Sumita

6 REPLIES 6

Former Member
0 Kudos

Sample Program

REPORT B180D071.

DATA:BEGIN OF BDC_TAB OCCURS 5.

INCLUDE STRUCTURE BDCDATA.

DATA: END OF BDC_TAB.

DATA: TEXT LIKE KNA1-NAME2

VALUE 'CALL_TRANSACTION_TEST'.

PARAMETERS:

DISMODE DEFAULT 'A',

UPDMODE DEFAULT 'S',

KUNNR LIKE KNA1-KUNNR DEFAULT 'BC180A01',

REGION LIKE KNA1-REGIO DEFAULT '01'.

START-OF-SELECTION.

WRITE: / 'Start CALL TRANSACTION ', SY-UZEIT.

Former Member
0 Kudos

Hi Sumita,

I think you can use "SET Parameter ID and GET Parameter ID" statements to pass the value to the std tcode VL02N.

the parameter id for delivery number input in VL02N tcode is 'VL', I suppose. You can check that from F1 help of input field.

so set the delivery no: selected from ALV to this ID SET PARAMETER ID 'VL' FIELD <field_name>. ( though Im not sure of how to get the selected value from ALV display)

and then use the statement CALL TRANSACTION 'VL02N ' AND SKIP FIRST SCREEN.

this option will skip the selection screen and call the second screen directly.

hope this helps,

Ramya PS

0 Kudos

Hi Ramya,

i have to pass two values and not one.I will not write two set paramert id's for delivery number and output type i suppose??Will submit statement in any case help??if yes the how??

0 Kudos

Hi,

I think you can go with Set parameter ID and Get Parameter ID as suggested.

If you are using a normal report, then you can use the event AT LINE SELECTION and then call transaction to call your desired transaction.

If you are using an ALV output, you could probably code in your user_command and call your desired transaction.

0 Kudos

Hi Sumita,

Submit statements are for accessing executable reports only. I dont think we can call VL02N through submit statements.

I suppose call transaction along with use of SET/GET will work out.

And the VL02N tcode has only one input field - "Outbound Delivery Number",, correct?? what is this Output type to be passed???

0 Kudos

Hi Sumita,

You can think of a small BDC recording and in your program use the statement call transaction using bdcdata to achieve this.

You'd have to set the BDC table before calling the transaction referring the recorded program.

Hope that helps.

Regards

Prasenjit