2014 Jun 30 8:13 PM
Hi,
I have to pass the Alv outputs line items order number to another transactions selection screen when i press a button on output.
i have putted my code in case when button press
Call Transaction 'tcode'.
but dont have any idea how to pass the order number to this transaction from line item of ALV output.
i am trying to use SET PARAMETER ID but no luck.
Please suggest the solution.
Br,
Surya
2014 Jul 01 7:26 AM
Hi Surya,
Can you please tell me which transaction are you trying to call ?
Thanks
Sri
2014 Jun 30 8:22 PM
1) It's necessary to make available to user selects the ALV line report
2) In ALV user routine, read the line selected
3) Get the values available in the selected line and fill RSPAR internal table
T_RSPAR... TYPE ... rsparams,
* Field values (+ range, example EQ or BT...)
4) Submit report using RSPAR data
SUBMIT ZYOURREPORT
WITH SELECTION-TABLE T_RSPAR
2014 Jul 01 4:13 AM
Hi,
If you are calling a standard transaction see how it is called using the "where used" in SE93 .
For example :
2014 Jul 01 7:26 AM
Hi Surya,
Can you please tell me which transaction are you trying to call ?
Thanks
Sri
2014 Jul 01 7:28 AM
2014 Jul 01 7:31 AM
Hi Surya,
What are the parameters in VA31 are you trying to pass from ALV report? Is it VA31 or VA33?
Did you try using the correct parameter ID like 'AUN' for order number in VA33?..
SET PARAMETER ID 'AUN' FIELD pls_inv_hdr-belnr.
CALL TRANSACTION 'VA33' AND SKIP FIRST SCREEN.
Regards
Sri
2014 Jul 01 7:40 AM
Hi Srilakshmi,
zva31 is being used for printing the order .
in which i want to pass the SO number from the ALV output.
I have used the same SET PARAMETER.
SET PARAMETER ID 'AUN' FIELD pls_inv_hdr-belnr.
CALL TRANSACTION VA33 AND SKIP FIRST SCREEN.
but unable to pass the field vbeln after FIELD..
for your information this report is created in OOPS.
so please tell me what should i write after SET PARAMETER ID 'AUN' FIELD ---
Many thanks.
Surya
2014 Jul 01 7:45 AM
Hi Surya,
SET PARAMETER ID 'AUN' FIELD ---
In the above line after FIELD .... we need to pass your order number i.e., VBELN .
Read your table with into workarea and pass workarea-vbeln after the FIELD in below line:
SET PARAMETER ID 'AUN' FIELD workarea-VBELN.
Hope this is what you are looking for.
Thanks
Sri
2014 Jul 05 10:29 AM
Thanks Sri,
But my problem is to read the structure for vbeln.
My Report is in OOPS and i dont have any idea to read the structure used.
as i have checked vbeln is being fetched from structure ZSD_OC_SO_ALV.
Please give the way so that i can pass the vbeln in the set parameter.
SET PARAMETER ID 'AUN' FIELD pls_inv_hdr-belnr.
CALL TRANSACTION VA33 AND SKIP FIRST SCREEN.
Br,
Surya
2014 Jul 07 7:38 AM
Hi Surya,
You have your ALV output dsplayed throgh some internal table right ? so when your selects some row in the output ... capture the order number in that line and pass to below code
Data:lt_row TYPE lvc_t_roid,
lt_index TYPE lvc_t_row,
*assign OK code
CLEAR gv_okcode.
gv_okcode = ok_code.
CLEAR ok_code.
CLEAR:lv_valid.
CALL METHOD go_alvgrid->check_changed_data
IMPORTING
e_valid = lv_valid.
*Get the selected row index from the ALV GRID
CALL METHOD go_alvgrid->get_selected_rows
IMPORTING
et_index_rows = lt_index
et_row_no = lt_row.
*Read selected rows data
REFRESH:lt_inv_hdr.
LOOP AT lt_index INTO ls_index.
READ TABLE gt_inv_hdr INTO ls_inv_hdr INDEX ls_index-index.
IF sy-subrc = 0.
ENDIF.
ENDLOOP.
CASE gv_okcode.
WHEN '&BUTTON'.
SET PARAMETER ID 'AUN' FIELD ls_inv_hdr-belnr.
CALL TRANSACTION VA33 AND SKIP FIRST SCREEN.
EndCase.
Please refer to program BCALV_GRID_05 which has good example for your case.
Thanks
Sri
2014 Jul 07 12:51 PM
thanks Sri,
Its was useful.
Now data is being passed to SO selection but i have also topass the output type.
I am doing the same
data: lv_outb0 type nast-kschl value 'BA00'.
SET PARAMETER ID 'NAC' FIELD lv_outb0
becaue button is set for this output type.
but this is not passed to output type selection.
And further call transaction tcode should excute interanlly with passed selections.
So no idea how it will be executed also.
Br,
Surya
2014 Jul 07 1:07 PM
Hi Surya.
Can you please tell me what this transaction is trying to do? If it is to create something in background mode, then you have to use bapi or BDCmethod to call a transaction in background mode to create data instead of just call transaction.
Below code is to call pirticular Transaction and just display something .
SET PARAMETER ID 'AUN' FIELD ls_inv_hdr-belnr.
CALL TRANSACTION VA33 AND SKIP FIRST SCREEN.
Thanks
Sri
2014 Jul 07 3:06 PM
Thanks Sri,
I am using standard tcode SA38.
and in background i have to process the output with passing output type and SO number.
If i am going to use the BDC method then,please tell me the process with the required code.
Br,
Surya
2014 Jul 23 7:27 AM