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

module pool

Former Member
0 Likes
986

can sombody tell me how to get a picture on click of push button. i also want a text to be displayed how to do it using module pool.

10 REPLIES 10
Read only

Former Member
0 Likes
962

HI,

u mean icon on the push button then goto the layout and double click on the pushbutton.

attributes pop-up will appear.in that icon_name option will be there.there u can select appropriate icon.

reward points if helpful.

rgds,

bharat.

Read only

Former Member
0 Likes
962

Hi madhavi,

I am not sure whether you can get picture or not.

But you can do the same with GUIxT which is synactive product. You can do in module pool program.

For more info: Just go through http://www.synactive.com/

You basically install this software GUIxT and in SAP Logon <b>Activate GUIxT</b> ......Just go through the website on synactive.com -> Designer tutorial -> Add Images

The tutorial provides how to add a image on the R/3 Screen.

Reward points if this is helpful

Thanks.

Hari krishna

Read only

0 Likes
962

hi how can i get f4 help in the module pool prog.

suppose i want to get all pernrs as my f4 help

Read only

0 Likes
962

Hi Madhavi,

If your earlier post is answered ...Please close the thread and re-open a new thread for new questions.

Here is the Example code for your new question.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_extwg-low.

PERFORM search_help_extwg USING 'S_MATKL-LOW' 'S_MATKL-HIGH'

s_extwg-low '1000'.

&----


*& Form search_help_extwg

&----


  • text

----


FORM search_help_extwg USING p_low p_high p_append p_screen.

DATA: BEGIN OF t_values OCCURS 2,

prodh LIKE t179-prodh ,

vtext LIKE t179t-vtext,

END OF t_values.

DATA : t_return LIKE ddshretval OCCURS 0 WITH HEADER LINE.

*

DATA : lv_low(30) .

DATA : lv_high(30).

RANGES : r_prodh FOR t179-prodh .

DATA : gt_dynp LIKE dynpread OCCURS 0 WITH HEADER LINE.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = sy-repid

dynumb = p_screen

request = 'A'

TABLES

dynpfields = gt_dynp

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.

CLEAR : gt_dynp.

READ TABLE gt_dynp WITH KEY fieldname = p_low.

lv_low = gt_dynp-fieldvalue.

CLEAR : gt_dynp.

READ TABLE gt_dynp WITH KEY fieldname = p_high.

lv_high = gt_dynp-fieldvalue.

IF lv_low IS INITIAL AND

lv_high IS INITIAL .

MESSAGE text-001 TYPE 'S'.

REJECT.

ENDIF.

  • Value range to be shown

r_prodh-sign = 'I'.

r_prodh-option = 'BT'.

IF NOT lv_low IS INITIAL.

CONCATENATE lv_low+0(5) text-005 INTO r_prodh-low.

ELSE.

CONCATENATE lv_high+0(5) text-005 INTO r_prodh-low.

ENDIF.

IF lv_high IS INITIAL.

CONCATENATE lv_low+0(5) text-009 INTO r_prodh-high.

ELSE.

CONCATENATE lv_high+0(5) text-009 INTO r_prodh-high.

ENDIF.

APPEND r_prodh.

  • Values to be shown

SELECT prodh FROM t179 INTO TABLE t_values

WHERE prodh IN r_prodh

AND stufe = '2'.

LOOP AT t_values.

SELECT SINGLE vtext FROM t179t INTO t_values-vtext

WHERE spras = sy-langu AND

prodh = t_values-prodh.

MODIFY t_values.

ENDLOOP.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'PRODH'

value_org = 'S'

TABLES

value_tab = t_values

return_tab = t_return

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc = 0.

READ TABLE t_return INDEX 1.

p_append = t_return-fieldval.

ENDIF.

Reward Points if useful.

Thanks.

Hari krishna

Read only

0 Likes
962

Hi

See this and do accordingly

For F4 Values on Screen:

PROCESS ON VALUE_REQUEST

using module call starting with FIELD i.e FIELD field MODULE module

There are number of function modules that can be used for the purpose, but these

can fullfill the task easily or combination of them.

DYNP_VALUE_READ

F4IF_FIELD_VALUE_REQUEST

F4IF_INT_TABLE_VALUE_REQUEST

POPUP_WITH_TABLE_DISPLAY

DYNP_VALUE_READ

This function module is used to read values in the screen fields. Use of this

FM causes forced transfer of data from screen fields to ABAP fields.

There are 3 exporting parameters

DYNAME = program name = SY-CPROG

DYNUMB = Screen number = SY-DYNNR

TRANSLATE_TO_UPPER = 'X'

and one importing TABLE parameter

DYNPFIELDS = Table of TYPE DYNPREAD

The DYNPFIELDS parameter is used to pass internal table of type DYNPREAD

to this FM and the values read from the screen will be stored in this table.This

table consists of two fields:

FIELDNAME : Used to pass the name of screen field for which the value is to

be read.

FIELDVALUE : Used to read the value of the field in the screen.

e.g.

DATA: SCREEN_VALUES TYPE TABLE OF DYNPREAD ,

SCREEN_VALUE LIKE LINE OF SCREEN_VALUES.

SCREEN_VALUE-FIELDNAME = 'KUNNR' . * Field to be read

APPEND SCREEN_VALUE TO SCREEN_VALUES. * Fill the table

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

DYNAME = SY-CPROG

DYNUMB = SY-DYNNR

TRANSLATE_TO_UPPER = 'X'

TABLES

DYNPFIELDS = SCREEN_VALUES.

READ TABLE SCREEN_VALUES INDEX 1 INTO SCREEN_VALUE.Now the screen value for field KUNNR is in the SCREEN_VALUE-FIELDVALUE and can be used for further processing like using it to fill the internal table to be used as parameter in F4IF_INT_TABLE_VALUE_REQUEST ETC.

F4IF_FIELD_VALUE_REQUEST

This FM is used to display value help or input from ABAP dictionary.We have to pass the name of the structure or table(TABNAME) along with the field name(FIELDNAME) . The selection can be returned to the specified screen field if three

parameters DYNPNR,DYNPPROG,DYNPROFIELD are also specified or to a table if RETRN_TAB is specified.

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

TABNAME = table/structure

FIELDNAME = 'field name'

DYNPPROG = SY-CPROG

DYNPNR = SY-DYNR

DYNPROFIELD = 'screen field'

IMPORTING

RETURN_TAB = table of type DYNPREAD

.

F4IF_INT_TABLE_VALUE_REQUEST

This FM is used to dsiplay values stored in an internal table as input

help.This FM is used to program our own custom help if no such input help

exists in ABAP dictionary for a particular field. The parameter VALUE_TAB is used to pass the internal table containing input values.The parameter RETFIELD

is used to specify the internal table field whose value will be returned to the screen field or RETURN_TAB.

If DYNPNR,DYNPPROG and DYNPROFIELD are specified than the user selection is passed to the screen field specified in the DYNPROFIELD. If RETURN_TAB is specified the selectionis returned in a table.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = field from int table whose value will be returned

DYNPPROG = SY-CPROG

DYNPNR = SY-DYNNR

DYNPROFIELD = 'screen field'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = internal table whose values will be shown.

RETURN_TAB = internal table of type DDSHRETVAL

EXCEPTIONS

parameter_error = 1

no_values_found = 2

others = 3.

POPUP_WITH_TABLE_DISPLAY

This FM is used to display the contents of an internal table in a popup window.The user can select a row and the index of that is returned in the CHOISE

parameter.The VALUETAB is used to pass the internal table.

A suitable title can be set using TITLETEXT parameter. The starting and end position of the popup can be specified by the parameters STARTPOS_COL / ROW and ENDPOS_ROW / COL .

CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'

EXPORTING

ENDPOS_COL =

ENDPOS_ROW =

STARTPOS_COL =

STARTPOS_ROW =

TITLETEXT = 'title text'

IMPORTING

CHOISE =

TABLES

VALUETAB =

EXCEPTIONS

BREAK_OFF = 1

OTHERS = 2.

e.g.

DATA: w_choice TYPE SY-TABIX.

DATA: BEGIN OF i_values OCCURS 0 WITH HEADER LINE,

values TYPE I,

END OF i_values.

PARAMETRS : id TYPE I.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR id

i_values-values = '0001'.

APPEND i_values.

i_values-values = '0002'.

APPEND i_values.

i_values-values = '0003'.

APPEND i_values.

i_values-values = '0004'.

APPEND i_values.

CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'

EXPORTING

ENDPOS_COL = 40

ENDPOS_ROW = 12

STARTPOS_COL = 20

STARTPOS_ROW = 5

TITLETEXT = 'Select an ID'

IMPORTING

CHOISE = w_choice

TABLES

VALUETAB = i_values

EXCEPTIONS

BREAK_OFF = 1

OTHERS = 2.

CHECK w_choice > 0.

READ TABLE i_values INDEX w_choice....now we can process the selection as it is contained

...in the structure i_values.

Other FM that may be used to provide input help is HELP_START .

Reward points for useful Answers

Regards

Anji

Read only

0 Likes
962

Hi Madhavi,

Use this piece of code:

In Flow Logic write this code,

PROCESS ON VALUE-REQUEST.

FIELD CURRENCY1 MODULE BOX.

Then In SE38,

DATA : CURRENCY1 LIKE ZCUREN-CURRENCY.

DATA: IT_BOX LIKE TABLE OF WA_BOX WITH HEADER LINE.

MODULE BOX INPUT.

SELECT CURRENCY FROM ZCUREN INTO CORRESPONDING FIELDS OF TABLE IT_BOX.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'CURRENCY'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = IT_BOX

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3.

ENDMODULE. " BOX INPUT

Please reward points...

Regards:

Sapna

Read only

0 Likes
962

hi sapana,

the field currency that you have made as module box this we have to add in the layout then we have to declare it as what type im not getting the exact way to do it.

Read only

0 Likes
962

thanks sapna,

im able to get the f4 help but the selected pernr is not displayed on the screen field.

how to get that.

Read only

0 Likes
962

hi im using the fm CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

im able to get the f4 help but its not comming on the screen feild vn im selecting the column from the f4 help. how to display the selected feild on the screen field.

Read only

Former Member
0 Likes
962

<b>here is the sample code for displaying the F4 value in the screen</b>

PROCESS ON VALUE-REQUEST( F4 ) statement

Code to demonstrate how to perform a manual value help(F4) on a particular field using the PROCESS ON VALUE-REQUEST statement and how to return values back to a table control on the screen. For standard screen fields simply move the value to the appropriate screen field name.


 
* Screen flow logic........

PROCESS BEFORE OUTPUT.
*MODULE PBO_MODULE.

PROCESS AFTER INPUT.
*MODULE PAI_MODULE.

PROCESS ON VALUE-REQUEST. "F4
  FIELD EKPO-EBELP MODULE help_ekpo.

 
 
  

* populate screen field from within PROCESS ON VALUE-REQUEST(F4) call
*&------------------------------------------------------------------*
*&      Module  help_responsibility  INPUT
*&------------------------------------------------------------------*
*       text
*-------------------------------------------------------------------*
MODULE help_ekpo INPUT.


**Transport values to table dynpro/screen table control
  DATA: l_stepl LIKE  sy-stepl,
        l_indx  LIKE  sy-stepl.
  DATA: dynpfields        LIKE dynpread OCCURS 5 WITH HEADER LINE.

* Adjust for scroling within table control
  CALL FUNCTION 'DYNP_GET_STEPL'
    IMPORTING
      povstepl        = l_stepl
    EXCEPTIONS
      stepl_not_found = 0
      OTHERS          = 0.

  l_indx = tc_ekpotable-top_line + l_stepl - 1. 
          "tc_ekpotable should already have been declared

  REFRESH dynpfields.
  CLEAR   dynpfields.
  dynpfields-fieldname  = 'EKPO-EBELN'.
  dynpfields-fieldvalue = '00010'   "wa_ekpo-ebeln.
  dynpfields-stepl      = l_stepl.
  APPEND dynpfields.
  dynpfields-fieldname  = 'EKPO-EBELP'.
  dynpfields-fieldvalue = '00020'   "wa_ekpo-ebelp.
  dynpfields-stepl      = l_stepl.
  APPEND dynpfields.

  CALL FUNCTION 'DYNP_VALUES_UPDATE'
    EXPORTING
      dyname     = 'SAPLZZ_EKKO'    "Program name
      dynumb     = '0100'           "Screen number 
    TABLES
      dynpfields = dynpfields
    EXCEPTIONS
      OTHERS     = 0.
ENDMODULE.                 " help_ekpo  INPUT



 

reward points if it is usefull ....

Girish