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

F4 help text display (Module pool)

Former Member
0 Likes
1,239

Hi all,

I have created a table control with two fields on the screen with one of them with F4 help.The Values appears fine, when selecting the F4. Now, the issue is that the description of F4 field should be shown on the other field. Suppose Field A has F4, clicking on F4 and selecting BBK(description is Bank Detail.). I want to show description in another field. Field B on table control.

I have used FM 'DYNP_VALUES_READ' to read the screen value entered..and fetching text from T table and passing it on using FM 'DYNP_VALUES_UPDATE'. But it still does nt displays text in field B.

Regards

Shakti

6 REPLIES 6
Read only

anup_deshmukh4
Active Contributor
0 Likes
785

Hello Shakti Parwanda ,

If the F4 help is custom ( if its a standard check the CHECK IF THE HELP IS EXPORTING THE FIELD TO SOME ID AND YOU CAN FETCH IT FROM SAM E ) you can use IMPORT / EXPORT paramaters to suffice your requirement ....

Read only

Former Member
0 Likes
785

Hi,

Pls verify if u r writing the module in PAI??

n also

if the field's type from Text Table and Screen where it is to be displayed are the same.

I hope after verifying these two points ur problem will b solved.

Regards,

Ibrar

Read only

Former Member
0 Likes
785

Hi,

Try the following code

Will be sending the code in pieces please copy paste it and do the changes appropriately.

*In the flow logic of the screen

PROCESS BEFORE OUTPUT.

  • MODULE STATUS_0110.

*

PROCESS AFTER INPUT.

  • MODULE USER_COMMAND_0110.

PROCESS ON VALUE-REQUEST.

FIELD ZDEALHD-ZTERM MODULE HELP_ZTERM. u201Cthis is for F4 help to be activated.

module HELP_ZTERM input.

PERFORM HELP_ZTERM. *code for F4 help

endmodule. " HELP_ZTERM INPUT

Hope this helps you, as it worked for me.

Regards,

Abhijit G. Borkar

Edited by: Abhijit Borkar on Dec 30, 2009 9:41 AM

Read only

0 Likes
785

form HELP_ZTERM .

DATA: BEGIN OF SVBAP OCCURS 12,

TABIX LIKE SY-TABIX,

END OF SVBAP.

DATA: BEGIN OF XVBAP OCCURS 125.

INCLUDE STRUCTURE VBAPVB.

DATA: END OF XVBAP.

DATA: da_display LIKE ddrefstruc-bool.

DATA: DA_VALUE LIKE VBKD-ZTERM.

DATA: DA_DYNPRO_PROGRAM LIKE SY-REPID.

DATA: DA_DYNPRO_NUMBER LIKE SY-DYNNR.

DATA: BEGIN OF DYNPFIELD_ZTERM OCCURS 1.

INCLUDE STRUCTURE DYNPREAD.

DATA: END OF DYNPFIELD_ZTERM.

DA_DYNPRO_PROGRAM = SY-REPID.

DA_DYNPRO_NUMBER = SY-DYNNR.

CLEAR DYNPFIELD_ZTERM.

REFRESH DYNPFIELD_ZTERM.

MOVE 'ZDEALHD-ZTERM' TO DYNPFIELD_ZTERM-FIELDNAME.change to your screen element

APPEND DYNPFIELD_ZTERM.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

DYNAME = DA_DYNPRO_PROGRAM

DYNUMB = DA_DYNPRO_NUMBER

TABLES

DYNPFIELDS = DYNPFIELD_ZTERM

EXCEPTIONS

OTHERS = 11.

IF SY-SUBRC <> 0.

EXIT.

ELSE.

READ TABLE DYNPFIELD_ZTERM WITH KEY FIELDNAME =

DYNPFIELD_ZTERM-FIELDNAME.

ENDIF.

LOOP AT SCREEN.

CHECK SCREEN-NAME = 'VBKD-ZTERM' AND

SCREEN-INPUT = '0'.

  • DA_DISPLAY = CHARX.

ENDLOOP.

IF DYNPFIELD_ZTERM-FIELDINP EQ SPACE.

  • DA_DISPLAY = CHARX.

ENDIF.

  • Call SD Sales BAdI

DATA: DA_LINE LIKE SY-TABIX,

DA_CORE_INACTIVE TYPE XFELD,

WA_SVBAP LIKE SVBAP,

WA_XVBAP LIKE XVBAP.

  • Determining Cursor

CLEAR WA_XVBAP.

GET CURSOR LINE DA_LINE.

IF DA_LINE GE 1.

READ TABLE SVBAP INTO WA_SVBAP INDEX DA_LINE.

IF SY-SUBRC = 0.

READ TABLE XVBAP INTO WA_XVBAP INDEX WA_SVBAP-TABIX.

ENDIF.

ENDIF.

  • INCLUDE ITEM_ZTERM_VALUES.

IF DA_CORE_INACTIVE IS INITIAL.

CALL FUNCTION 'FI_F4_ZTERM'

EXPORTING

I_KOART = 'D'

I_ZTERM = ZDEALHD-ZTERM

I_XSHOW = DA_DISPLAY

IMPORTING

E_ZTERM = DA_VALUE.

ENDIF.

PERFORM DYNP_VALUES_UPDATE USING SY-REPID

SY-DYNNR

'ZDEALHD-ZTERM'

DA_VALUE

CHANGING SY-SUBRC. will be sending it in the next post

ZDEALHD-ZTERM = DA_VALUE.

endform. " HELP_ZTERM

Read only

0 Likes
785

form dynp_values_update using us_repid

us_dynnr

us_field

us_value

changing ch_subrc.

data: da_dynpfield_tab like dynpread occurs 0 with header line,

da_stepl like sy-stepl,

da_repid like d020s-prog,

da_dynnr like d020s-dnum.

ch_subrc = 4.

refresh da_dynpfield_tab.

move us_repid to da_repid.

move us_dynnr to da_dynnr.

get cursor line da_stepl.

move da_stepl to da_dynpfield_tab-stepl.

move us_field to da_dynpfield_tab-fieldname.

move us_value to da_dynpfield_tab-fieldvalue.

append da_dynpfield_tab.

call function 'DYNP_VALUES_UPDATE'

exporting

dyname = da_repid

dynumb = da_dynnr

tables

dynpfields = da_dynpfield_tab

exceptions

invalid_abapworkarea = 1

invalid_dynprofield = 2

invalid_dynproname = 3

invalid_dynpronummer = 4

invalid_request = 5

no_fielddescription = 6

undefind_error = 7

others = 8.

if sy-subrc eq 0.

ch_subrc = 0.

endif.

endform. " DYNP_VALUES_UPDATE

Just collate all the three post and plug it into your program.

Regards,

Abhijit G. Borkar

Read only

0 Likes
785

Hi Shakt,

i I am really sorry i did'nt read your question properly, please ignore my earlier posts.

Now for your requirement write a code in the PBO of the corresponding screen and check field A here.

if not Field A is initial.

fetch the data from the text table and pass it to the screen element which you are using for description.

endif.

Effect.

After choosing the data from the F4 help then press enter then the description will be populated .

Hope it helps you,

Regards,

Abhijit G. Borkar