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

Submit and return - Selection options

Former Member
0 Likes
2,740

Hi

I'm calling program h99cwtr0 using a submit and return. This executable program has its own selection screens and push buttons.

How can i pass a parameter to program h99cwtr0 to choose a field on the other selections window using the push button "Object selection" . I want to add the personel number to the results.

Regards

REPORT  zreport.
                                .
* Using logical database PNP
TABLES: pernr.

*Code used to populate 'select-options' & execute report
DATA: seltab TYPE TABLE OF rsparams,
      seltab_wa LIKE LINE OF seltab.


DATA : listtab LIKE abaplist OCCURS 1.
DATA : listtab_tmp LIKE abaplist OCCURS 1.
DATA : n TYPE n.

initialization.

seltab_wa-selname = 'PNPPERNR'.
seltab_wa-sign    = 'I'.
seltab_wa-option  = 'EQ'.

* load each personnel number accessed from the structure into
* parameters to be used in the report
LOOP AT pnppernr.
  seltab_wa-low = pnppernr-low.
  APPEND seltab_wa TO seltab.
ENDLOOP.

SUBMIT h99cwtr0 with selection-table seltab USING SELECTION-SCREEN '1000'
WITH begd_cal = pnpbegda
WITH endd_cal = pnpendda
exporting list to memory and return.

6 REPLIES 6
Read only

Former Member
0 Likes
1,678

DATA: SELTAB TYPE TABLE OF RSPARAMS,

SELTAB_WA LIKE LINE OF SELTAB.

MOVE: 'LANGU' TO SELTAB_WA-SELNAME,

'S' TO SELTAB_WA-KIND, " SELECT-OPTION

'I' TO SELTAB_WA-SIGN,

'BT' TO SELTAB_WA-OPTION,

'D' TO SELTAB_WA-LOW,

'I' TO SELTAB_WA-HIGH.

APPEND SELTAB_WA TO SELTAB.

MOVE: 'E' TO SELTAB_WA-SIGN,

'EQ' TO SELTAB_WA-OPTION,

'F' TO SELTAB_WA-LOW,

SPACE TO SELTAB_WA-HIGH.

APPEND SELTAB_WA TO SELTAB.

CLEAR SELTAB_WA.

MOVE: 'ARBGB' TO SELTAB_WA-SELNAME,

'P' TO SELTAB_WA-KIND, " PARAMETER

'XX' TO SELTAB_WA-LOW.

APPEND SELTAB_WA TO SELTAB.

SUBMIT REPORT00

USING SELECTION-SET 'VARIANT1'

WITH ARBGB CP 'A*'

WITH SELECTION-TABLE SELTAB

AND RETURN.

hope it helps,

regards,

Abhijit

Read only

0 Likes
1,678

Hi Abhijit,

Program H99CWTR0 has it own dynamic selections. When you click the pushbutton "object selection' it creates a ALV popup screen with some fields you need to select. How can i preselect those fields using the submit function?

Read only

0 Likes
1,678

Hi,

Try to create a variant.. (select the fields which u want for display) and use the same at the time of submit.. and u can pass the values from selection table as well.

Nag

Read only

0 Likes
1,678

Hi,

You can use SUBMIT <report name> USING SELECTION-SET AND RETURN.

just use the F1 help for more details.

Thanks,

Harini

Read only

1,678

You can pass the input to the submit program using "SUBMIT <prog.name> WITH <parameter> = <value> AND RETURN." Here you can pass all parameters which are required to process the the submit program. So you have to check the parameter name of the submit program and then pass the value here in the main program to that parameter.

Read only

Former Member
0 Likes
1,678

Hi,

It's hidden pretty good, but the parameter you are looking for is P_H_STRG. You need to add values according to the following mapping table, depending on what output fields you want:

Personnel Subarea 13

Company Code 07

Personnel Area 10

Wage Type 30

For-Period 43

Person ID 01

Personnel Number 03

Personnel Subarea 13

Master Controlling Area 17

Master Cost Center 20

Employee Group 24

Employee Subgroup 27

In-Period 34