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

Question reg. selection screen

Former Member
0 Likes
867

I am writing a report. On selection screen, I have a field for Sales order (vbeln) from a custom table zsales. Now when the user selects this field on selection screen and press F4, he/she should be able to select the salesorders from the table zsales.

I wrote:

SELECT-OPTIONS: s_vbeln FOR zsales-vbeln.

But on the output, when I press F4, I am still not getting any input help. What change can you suggest?

Appreciate your input.

Thanks,

Krishen

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
826

Try something like this.



report zrich_0001 .

tables: zsales

data: begin of izsales occurs 0,
       vbeln type vbak-vbeln,
      end of izsales.

select-options s_vbeln for zsales-vbeln.

initialization.

  select vbeln into table izsales from zsales.

  sort izsales ascending by vbeln.
  delete adjacent duplicates from izsales comparing vbeln.

at selection-screen on value-request for s_vbeln-low.

  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
       exporting
            retfield    = 'VBELN'
            dynprofield = 'S_VBELN'
            dynpprog    = sy-cprog
            dynpnr      = sy-dynnr
            value_org   = 'S'
       tables
            value_tab   = izsales.

start-of-selection.


Regards,

Rich Heilman

7 REPLIES 7
Read only

Former Member
0 Likes
826

Hi,

In your Z-table probably u did'nt give any value table ...

check for this in your table.

Madhavi

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
827

Try something like this.



report zrich_0001 .

tables: zsales

data: begin of izsales occurs 0,
       vbeln type vbak-vbeln,
      end of izsales.

select-options s_vbeln for zsales-vbeln.

initialization.

  select vbeln into table izsales from zsales.

  sort izsales ascending by vbeln.
  delete adjacent duplicates from izsales comparing vbeln.

at selection-screen on value-request for s_vbeln-low.

  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
       exporting
            retfield    = 'VBELN'
            dynprofield = 'S_VBELN'
            dynpprog    = sy-cprog
            dynpnr      = sy-dynnr
            value_org   = 'S'
       tables
            value_tab   = izsales.

start-of-selection.


Regards,

Rich Heilman

Read only

Former Member
0 Likes
826

Hi,

In the table use the check table VBAK for the field vbeln.

OR

Create a select-options for the field VBAK-VBELN.

TABLES: VBAK.

SELECT-OPTIONS: s_vbeln FOR <b>VBAK-VBELN</b>.

Thanks,

Naren

Read only

Former Member
0 Likes
826

Hi Kishen,

Check out if you specified the Check table (i.e., VBUK for vbeln) in the Table's(ZSALES) Entry Help/Check tab through se11.

Regards,

vinod.

Read only

ferry_lianto
Active Contributor
0 Likes
826

Hi,

Have you assign the foreign keys for field VBELN in ZSALES table?

If you have not you can select the proposed system one.

Hope this will help.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
826

Hi Krish ,

May be you haven't declared vheln as a key field in the Custom table . if you declare it as a key field search help will come automatically . other wise create a search help in SE11 and assign this search help to the parameter.

syntax : select-option : s_vbeln for zsales-vbeln MATCHCODE OBJECT search_help.

Thanks

Prithvi

Read only

Former Member
0 Likes
826

Krishen,

Check whether you have given check table for ur vbeln in zsales table.

it check table is there, then only you get the f4 help.

-Anu