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

help-

Former Member
0 Likes
399

In my select options there is document number(BELNR) and document type(BLART). And I have also declared f4 help for document number(BELNR).

Now thing is that I have dcelared some document type like 'KG', 'DG', 'KZ' and 'DZ'. Suppose when I am selction one document type for example 'KG'

and pressing f4 help in Documrnt number, Then only the number should display which are corresponding to 'KG' only. But when I am pressing f4 button it shows all document number related to every document type. I dont want like this. How I will do that. where do I need to modify my code. Do I need to make some changes in F4 help. Plz show me the way. Hope u r getting my problem. It's a print program for the smart form.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_belnr.

DESCRIBE TABLE it_hlp LINES wk_lines.

IF wk_lines = 0.

SELECT belnr gjahr bldat budat INTO CORRESPONDING FIELDS OF it_hlp

FROM bkpf

WHERE bukrs = b_bukrs AND

bstat = ' ' AND

blart IN s_blart.

APPEND it_hlp.

ENDSELECT.

ENDIF.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'BELNR'

dynprofield = 'P_BELNR'

dynpprog = sy-cprog

dynpnr = sy-dynnr

value_org = 'S'

TABLES

value_tab = it_hlp.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
375

Hi Abhay,

Instead of selecting document type in AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_belnr.

do it in AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_blart.

It'll work..

Regds,

Younus

<b>Reward Helpful Answers!!!</b>

2 REPLIES 2
Read only

Former Member
0 Likes
376

Hi Abhay,

Instead of selecting document type in AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_belnr.

do it in AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_blart.

It'll work..

Regds,

Younus

<b>Reward Helpful Answers!!!</b>

Read only

Former Member
0 Likes
375

Hi

Prepare a Z table with Doc type (BLART) and the BELNR fields

write small program such that, fetch the documents related to that particular Doc type along with belnrs into an internal table, and update the Z table with the data of internal table

Noe create an elementary search help in Se11 using the above Z table and use that search help in the declaration of BELNR field on selection screen.

that will display only those values related to that particular type.

Reward points if useful

Regards

Anji