Application Development 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: 

Process on Help Request

Former Member
0 Kudos

We are working on craetion of a transaction screen containing 10 different Tabstrips pertaining to some Finance Related Fields as given by the Client.I need help on how to include Process on Help request for 2 field namely "Account No" and " Name" taken from a table created by user " zeocpp". This POH should come into picture when user wants to enter "Account No" and "Name" before entering into any of the input fields of the Tabstrip present in the transaction and Execute the program.

Thanks

Rosalin

2 REPLIES 2

Former Member
0 Kudos

This is how i restrict or populate search help or matchcode on a Dynpro with my own data. There's another way to do this on selection-screens. Just let me know if you want that method too.

1. Go to SE11 and create a 'Z' search help if your field doesn't have one.

2. Asign this new search help to your field on your screen painter field attributes .

3. include the PROCESS ON VALUE-REQUEST on your dynpro logic :

PROCESS BEFORE OUTPUT.

  • MODULE STATUS_0100.

PROCESS AFTER INPUT.

  • MODULE USER_COMMAND_0100.

PROCESS ON VALUE-REQUEST. <----


this is the new peace of code

4) include right after step 2 in this manual

your new module wich is going to handle your code .

field P_AUGBL MODULE test.

5) Double click over this new module to create it inside the program

(p.e. For this example case, i just have in my dynpro 2 fields. LIFNR and AUGBL.

the first field is going to be populated then when you click the search help for the

second field, it will get into your code and bring the data you want to be selected.)

&----


*& Module test INPUT

&----


  • text

----


MODULE test INPUT.

dynfields-fieldname = 'LFA1-LIFNR'.

APPEND dynfields.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = sy-cprog

dynumb = sy-dynnr

translate_to_upper = 'X'

TABLES

dynpfields = dynfields

EXCEPTIONS

invalid_abapworkarea = 1

invalid_dynprofield = 2

invalid_dynproname = 3

invalid_dynpronummer = 4

invalid_request = 5

no_fielddescription = 6

invalid_parameter = 7

undefind_error = 8

double_conversion = 9

stepl_not_found = 10

OTHERS = 11.

READ TABLE dynfields WITH KEY fieldname = 'LFA1-LIFNR'.

lfa1-lifnr = dynfields-fieldvalue.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = lfa1-lifnr

IMPORTING

output = lfa1-lifnr.

SELECT augbl bukrs budat INTO TABLE help_item

FROM bsak

WHERE lifnr = LFA1-lifnr.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'AUGBL'

dynprofield = 'P_AUGBL'

dynpprog = sy-cprog

dynpnr = sy-dynnr

value_org = 'S'

TABLES

value_tab = help_item.

ENDMODULE. " test INPUT

Former Member
0 Kudos

I forgot to mention the declaration part for the example:

6) Create this part of code in your main program:

DATA: BEGIN OF help_item OCCURS 0,

augbl TYPE bsak-augbl,

bukrs TYPE bsak-bukrs,

budat TYPE bsak-budat,

END OF help_item.

DATA: dynfields TYPE TABLE OF dynpread WITH HEADER LINE.

DATA: lfa1-lifnr LIKE lfa1-lifnr.