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

Search help

Former Member
0 Likes
862

Hello, I have a parameter called p_vbeln like vbak-vblen. On the selection-screen when I click on the match-code all the vblen appearing not only the vblens which belonging to table vbak. Question is: How can I get only that vbelns which are belonging to vbak table when I click on the matchbox?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
783

Hi,

Yes, it will give all Vbelns present in VBUK table. If You want to show only VBAK vbelns then You can write code in "At Selection Screen on value-request" on P_vbeln by calling FM "F4IF_INT_TABLE_VALUE_REQUEST". write select statement getting all Vbelns of VBAK table and pass that internal table to this FM. When you click on Match box, only VBAK vbelns will be shown.

thanks,

sksingh

7 REPLIES 7
Read only

Former Member
0 Likes
783

hi,

you click on new selection button and give the table name as vbak

regards,

pankaj singh

Read only

Former Member
0 Likes
783

in ur select-option use this as...

select-option: s_vbeln for vbak-vbeln.

or else

select-option: s_vbeln for vbuk-vbeln.

Read only

Former Member
0 Likes
783

I defined as following, but it's not solved the problem.

PARAMETERS : p_vbeln LIKE vbak-vbeln.

When I click on the match code I need to display only that vbelns which belonging to vbak table. So any ideas?

Read only

Former Member
0 Likes
784

Hi,

Yes, it will give all Vbelns present in VBUK table. If You want to show only VBAK vbelns then You can write code in "At Selection Screen on value-request" on P_vbeln by calling FM "F4IF_INT_TABLE_VALUE_REQUEST". write select statement getting all Vbelns of VBAK table and pass that internal table to this FM. When you click on Match box, only VBAK vbelns will be shown.

thanks,

sksingh

Read only

Former Member
0 Likes
783

Hi,

at selection screen on p_vbeln.

perform help_check.

FORM HELP_CHECK.

*-- Set up fields to retrieve data

ltab_fields-tabname = 'VBAK'.

ltab_fields-fieldname = 'VBELN'.

ltab_fields-selectflag = 'X'.

APPEND ltab_fields.

SORT ltab_fields.

DELETE ADJACENT DUPLICATES FROM ltab_fields.

*-- Fill values

SELECT vbeln

INTO TABLE ltab_values

FROM vbak.

SORT ltab_values.

DELETE ADJACENT DUPLICATES FROM ltab_values.

CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'

EXPORTING

fieldname = 'vbeln'

tabname = 'vbak'

title_in_values_list = 'Select a value'

IMPORTING

select_value = p_vbeln

TABLES

fields = ltab_fields

valuetab = ltab_values

EXCEPTIONS

field_not_in_ddic = 01

more_then_one_selectfield = 02

no_selectfield = 03.

ENDFORM. "fiscal_year

hope this helps,

keerthi

Read only

0 Likes
783

Could you tell me the type of ltab_fields?

Read only

0 Likes
783

hi,

itab_fields like help_value.

check function module documentation.

regards,

keerthi