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: 

Set and Get parameters using SAP memory.

Former Member
0 Kudos
955

I have an ALV grid list that I want to transfer to a detail report when the user doubleclicks. I have set up a parameter transaction associated with the detail report. My problem is the transfer does not take place. After the "CALL TRANSACTION" the ALV grid list refreshes with none of the previous select-options being used. Is there further setup I need to do, or is my coding incorrect? All of the parameter fields have valid values. I am new to ABAP, so please be fairly specific with you answer.

ALV Grid code:

form user_command using r_ucomm like sy-ucomm

rs_selfield type slis_selfield.

case r_ucomm.

when '&IC1'.

read table gt_data index rs_selfield-tabindex into gt_data_drilldown.

set parameter id 'LIF' field gt_data_drilldown-lifnr.

set parameter id 'BLN' field gt_data_drilldown-belnr.

set parameter id 'CHK' field gt_data_drilldown-chect.

set parameter id 'BES' field gt_data_drilldown-ebeln.

set parameter id 'BSP' field gt_data_drilldown-ebelp.

set parameter id 'MAT' field gt_data_drilldown-matnr.

set parameter id 'WRK' field gt_data_drilldown-werks.

call transaction 'ZRVRAD' and skip first screen.

endcase.

endform.

Detail report code:

start-of-selection.

  • all fields are in DATA stmts.

get parameter id 'LIF' field lifnr.

get parameter id 'BLN' field belnr.

get parameter id 'CHK' field chect.

get parameter id 'BES' field ebeln.

get parameter id 'BSP' field ebelp.

get parameter id 'MAT' field matnr.

get parameter id 'WRK' field werks.

end-of-selection.

write:/1 sy-vline,

lifnr under 'Vendor #',

35 sy-vline,

belnr under 'Invoice #',

50 sy-vline,

chect under 'Cheque #',

65 sy-vline,

belnr under 'PO #'.

uline.

uline.

write:/1 sy-vline,

chect under 'Item #',

90 sy-vline,

matnr under 'Material #',

105 sy-vline,

werks under 'Plant'

Thanks in advance for your help - Jim

.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
159

will call transaction and skip first screen, work for reports ? I doubt.. even if, all fields are having parameter ids.... am not sure.. just my thoughts..

maybe u can use a submit report

5 REPLIES 5

Former Member
0 Kudos
159

comment out get Parameter id in start of -selection.

former_member194669
Active Contributor
0 Kudos
159

Hi,

This may be a roundaway soluation. I also comes across this scenario.


start-of-selection.
 perform f_get_selections_values.    " Here i captured all selection values in int. table
 perform f_display_output.


form f_get_selections_values.
  v_program = sy-repid.
  call function 'RS_REFRESH_FROM_SELECTOPTIONS'
    exporting
      curr_report     = v_program
    tables
      selection_table = i_seltab
    exceptions
      not_found       = 1
      no_report       = 2.
  if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.
endform.                                 " F_get_selections_values

* While existing from grid screen i called the same program with selection values again

form f_exit_program.
  call method g_custom_container->free.
  call method cl_gui_cfw=>flush.
  submit ycr0009 with selection-table i_seltab via selection-screen.
endform.                                 " F_exit_program

May this will help you.

aRs

Former Member
0 Kudos
160

will call transaction and skip first screen, work for reports ? I doubt.. even if, all fields are having parameter ids.... am not sure.. just my thoughts..

maybe u can use a submit report

Former Member
0 Kudos
159

It is possible for Ztransaction ,

Create one screen which has just mara-matnr.look at input/output fields.

check set parametr id and get parameter id .

See below report program :

tables : mara.

data wa_usr like v_usr_name.

start-of-selection.

mara-matnr = '100'.

set parameter id 'MAT' field mara-matnr.

call transaction 'ZWM_ASSIGN_TRUCK'.

Former Member
0 Kudos
159

Thanks for the replies.

Problem was resolved with submit report. Code is below:

<u>Calling ALV List program:</u>

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

CASE r_ucomm.

WHEN '&IC1'.

READ TABLE gt_data INDEX rs_selfield-tabindex INTO gt_data_drilldown.

SET PARAMETER ID 'LIF' FIELD gt_data_drilldown-lifnr.

SET PARAMETER ID 'BLN' FIELD gt_data_drilldown-belnr.

SET PARAMETER ID 'CHK' FIELD gt_data_drilldown-chect.

SET PARAMETER ID 'BES' FIELD gt_data_drilldown-ebeln.

SET PARAMETER ID 'BSP' FIELD gt_data_drilldown-ebelp.

SET PARAMETER ID 'MAT' FIELD gt_data_drilldown-matnr.

SET PARAMETER ID 'WRK' FIELD gt_data_drilldown-werks.

SUBMIT zco_rpt_vra_detail AND RETURN.

IF sy-subrc <> 0.

ENDIF.

ENDCASE.

ENDFORM. "user_command

<u>Called program zco_rpt_vra_detail:</u>

START-OF-SELECTION.

GET PARAMETER ID 'LIF' FIELD lifnr.

GET PARAMETER ID 'BLN' FIELD belnr.

GET PARAMETER ID 'CHK' FIELD chect.

GET PARAMETER ID 'BES' FIELD ebeln.

GET PARAMETER ID 'BSP' FIELD ebelp.

GET PARAMETER ID 'MAT' FIELD matnr.

GET PARAMETER ID 'WRK' FIELD werks.

END-OF-SELECTION.

WRITE:/1 sy-vline, 'Vendor', 20 sy-vline, 'Vendor #', 35 sy-vline, 'Invoice #',50 sy-vline,

'Cheque #', 65 sy-vline, 'PO #', 80 sy-vline, 'Item #', 90 sy-vline,

'Material #', 105 sy-vline, 'Plant'.

ULINE.

WRITE: 'MyVendor' UNDER 'Vendor', lifnr UNDER 'Vendor #', belnr UNDER 'Invoice #',

chect UNDER 'Cheque #', ebeln UNDER 'PO #', ebelp UNDER 'Item #', matnr UNDER 'Material #',

werks UNDER 'Plant'.