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: 

module pool domain text display info req?

Former Member
0 Kudos

hi

i had an req to show a filed MATNR on a screen in module pool pgm,there shd be a i/p filed for material,user can select the material from the list of available materials,along with the test to be displayed for the filed next to material nos.

the list of mateiral is based on the login user name.

i am able to display the material list,but text is not coming.

pls tell me how to show the text next to matnr no. in list.

i had used the code:

loop at itab_carrid.

clear:text.

CALL FUNCTION 'ADS2KIPBRO_GET_DOMAIN_TEXT'

EXPORTING

E_TABLE = 'MARA'

E_FIELD = 'MATNR'

E_VALUE = itab_carrid-matnr

IMPORTING

I_TEXT = text

EXCEPTIONS

ILLEGAL_INPUT = 1

DOMAIN_NOT_FOUND = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

move text to itab_carrid-text1.

modify itab_carrid transporting text1.

endloop.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'MATNR'

value_org = 'S'

TABLES

value_tab = itab_carrid

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

ENDIF.

7 REPLIES 7

Former Member
0 Kudos

vipin,

what are the fields declared inside your table itab_carrid?

you can declare MATNR and TEXT field on the ITAB_CARRID table. populate the value of the domain into this TEXT field and pass this to the function module and it should work.

former_member1245113
Active Contributor
0 Kudos

Dear Vipin,

are you looking to display the Material Description or something else.

if material description then use MAKT Table and field name is MAKTX.

WRITE your select query accordingly

regards

Ramchander Rao.K

0 Kudos

Screen I/P:

Material:...........(input text filed mara-matnr) in module pool

here the list have to be displyed based on user,say for vipin:10 matnrs only.

but when user click on f4,he shd also see the matnr no along with the text.

like:101 text1

102 text2

013 text3

i am able to display the valus:101,102,103...

but not able to display the text.

as i am using the 1 filed to display out of the FM:

  • CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

  • EXPORTING

  • retfield = 'ACTVT'

  • value_org = 'S'

  • TABLES

  • value_tab = itab_carrid

  • EXCEPTIONS

  • parameter_error = 1

  • no_values_found = 2

  • OTHERS = 3.

  • IF sy-subrc <> 0.

  • ENDIF.

table:matnr like mara-matnr,

text(40) type c.

there is data in my table,but its only displaying the matnr ...

0 Kudos

Vipin,

do you mean the user who created the material am i correct.

please let us know.

regards

Ramchander Rao.K

0 Kudos

ya u can think in same way also.

the only purpose currenlty is to selct the matnr from the list based on user.

Former Member
0 Kudos

After PAI

PROCESS ON VALUE-REQUEST.

FIELD PA0002-PERNR MODULE VALUE_HELP_PRCTR.

&----


*& Module VALUE_HELP_PRCTR INPUT

&----


  • text

----


module VALUE_HELP_PRCTR input.

DATA: BEGIN OF ITAB1 OCCURS 0,

PERNR TYPE PA0002-PERNR,

NACHN TYPE PA0002-NACHN,

VORNA TYPE PA0002-VORNA,

END OF ITAB1.

DATA: WA_ITAB1 LIKE LINE OF ITAB1.

SELECT PERNR NACHN VORNA FROM PA0002 INTO TABLE ITAB1

  • FOR ALL ENTRIES IN ITAB WHERE PERNR = ITAB-PERNR

WHERE BEGDA LE SY-DATUM

AND ENDDA GE SY-DATUM.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'PERNR'

DYNPPROG = SY-REPID

DYNPNR = SY-DYNNR

DYNPROFIELD = 'P_PERNR'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = ITAB1

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3.

endmodule. " VALUE_HELP_PRCTR INPUT

Pass matnr and text to itab1 it will appear there.

0 Kudos

hi

tell me,if i made a i/p field on screen from the data variable declared in my program

like :data:actvt(3) type c.

than on layout of screen:I/P filed-actvt.

now i want to provide the f4 to this.i had written the POV for the filed,the data is there in itab,but not poping out.

code:PROCESS ON VALUE-REQUEST.

FIELD ACTVT MODULE create_dropdown_box.

TYPES: BEGIN OF type_carrid,

actvt(3) type c,

text1(40) type c,

END OF type_carrid.

DATA: itab_carrid type Type_carrid occurs 0 with header line.

itab_carrid-actvt = '001'.

append itab_carrid.

itab_carrid-actvt = '002'.

append itab_carrid.

itab_carrid-actvt = '003'.

append itab_carrid.

itab_carrid-actvt = '004'.

append itab_carrid.

itab_carrid-actvt = '005'.

append itab_carrid.

itab_carrid-actvt = '006'.

append itab_carrid.

itab_carrid-actvt = '007'.

append itab_carrid.

endif.

clear:itab_carrid.

loop at itab_carrid.

clear:text.

CALL FUNCTION 'ADS2KIPBRO_GET_DOMAIN_TEXT'

EXPORTING

E_TABLE = 'YLOGON1'

E_FIELD = 'ACTVT'

E_VALUE = itab_carrid-actvt

IMPORTING

I_TEXT = text

EXCEPTIONS

ILLEGAL_INPUT = 1

DOMAIN_NOT_FOUND = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

move text to itab_carrid-text1.

modify itab_carrid transporting actvt text1.

endloop.

clear:itab_carrid.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'ACTVT'

DYNPNR = SY-DYNNR

DYNPPROG = SY-REPID

value_org = 'S'

TABLES

value_tab = itab_carrid

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

ENDIF.

plz tell me how to pop out this help in screen.