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

Issue with Submit

jogeswararao_kavala
Active Contributor
0 Likes
738

Dear Experts,

I am using submit function as below:

FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
IF rs_selfield-fieldname = 'ARBPL'.

  READ TABLE itab INTO wa INDEX rs_selfield-tabindex.
  wa-date1 = so_gstrp-low.
    wa-date2 = so_gstrp-high.

submit zpmc AND return
with so_arbpl-low = wa-arbpl
with so_gstrp-low GE wa-date1
with so_gstrp-high LE wa-date2.

endif.
endform.

What is found in debugging is  the so_gstrp-high  (gstrp is a date field) is not passing to the called program selection screen.

Please guide.

kind regards

Jogeswara Rao

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
702

Hi,

You're trying to use 2 different options in the same select-options (GE and LE). You should use a range with BT option instead. It should look like this :

data : r_gstrp type range of dats.

r_gstrp-low = wa-date1.

r_gstrp-high = wa-date2.

r_gstrp-sign = 'I'.

r_gstrp-option = 'BT'.

append r_gstrp.

submit zpmc and return with so_gstrp in r_gstrp.

5 REPLIES 5
Read only

Former Member
0 Likes
703

Hi,

You're trying to use 2 different options in the same select-options (GE and LE). You should use a range with BT option instead. It should look like this :

data : r_gstrp type range of dats.

r_gstrp-low = wa-date1.

r_gstrp-high = wa-date2.

r_gstrp-sign = 'I'.

r_gstrp-option = 'BT'.

append r_gstrp.

submit zpmc and return with so_gstrp in r_gstrp.

Read only

0 Likes
702

Thank you very much Nicolas!

Now Dates are passing, but the ARBPL value is passing wrong.

The code is as under:

FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
IF rs_selfield-fieldname = 'ARBPL'.

  READ TABLE itab INTO wa INDEX rs_selfield-tabindex.
  wa-date1 = so_gstrp-low.
    wa-date2 = so_gstrp-high.

data : r_gstrp type range of dats with header line.
r_gstrp-low = wa-date1.
r_gstrp-high = wa-date2.
r_gstrp-sign = 'I'.
r_gstrp-option = 'BT'.
append r_gstrp.

submit zpmc AND return
with so_arbpl-low = wa-arbpl
with so_gstrp in r_gstrp.

endif.

endform.

Unable to make out which value of ARBPL is passing.

kind regards

Jogeswara Rao

Read only

0 Likes
702

Hi,

Do the same for SO_ARBPL also.

DATA r_arbpl TYPE RANGE OF arbpl WITH HEADER LINE.

r_arbpl-low = wa-arbpl.

r_arbpl-sign = 'I'.

r_arbpl-option = 'EQ'.

APPEND r_arbpl.

and in SUBMIT pass this range to the select option.

WITH so_arbpl IN r_arbpl.

Thanks,

Shambu

Read only

0 Likes
702

Hi Jogeswara Rao,

Please recheck your decleration of your final internal table ( TYPE dataelement) and preparation of your fieldcatalog internal table, may be problem in field catalog internal table.

Regards,

SuryaPraveen

Read only

0 Likes
702

Hi,

Apply the same method for ARBPL : declare antoher range with ARBPL type, fill it with the correct values (low = wa-arbpl, sign = 'I' and option = 'EQ') and use this range in the SUBMIT statement.

That should work fine.

Regards.

Nicolas