cancel
Showing results for 
Search instead for 
Did you mean: 

need help on module pool programming

Former Member
0 Kudos

hi frns !

my requirement is

i had created 2 screens. in the first screen i have given matnr field as input field if i enter the valid value i have to display the corresponding meins mtart maktx fields related to that number in the next screen.

even i have to validate the matnr field in the first screen as well as i have to provide f4(pov) and (poh) functionality.then i have to link the next screen to this first screen.

how can i do this ?

if any body have some sample code which matches to my requirement please reply to me

thank you.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

First create your first screen say 100.

In that screen 100 write ur select satetment in PBO.

select * from MARA into corresponding fields of table i_mara where matnr = mara-matnr.

When u enter matnr in input field all the remaining 3 fields value must be diplayed..

For that place a button in that screen 100 called "Enter".

and in the PAI event of screen 100 write.....

case sy-ucomm.

when ENTER(function code of that button).

display ur 3 fileds meins mtart maktx based on matnr..

.

.

..

.

.

endcase.

for F4 help on matnr use the foll function module...

MODULE value_carrier INPUT.

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

tabname = 'DEMOF4HELP'

fieldname = 'matnr'

dynpprog = progname

dynpnr = dynnum

dynprofield = 'matnr'.

ENDMODULE.

Former Member
0 Kudos

hi

here is sample code

this is in first screen:

PROCESS BEFORE OUTPUT.

MODULE guistatus1.

PROCESS AFTER INPUT.

FIELD v_kunnr MODULE validate_kunnr ON INPUT.

MODULE user_command_0100.

MODULE exit AT EXIT-COMMAND.

***********************************************8

MODULE validate_kunnr INPUT.

SELECT SINGLE kunnr name1

FROM kna1

INTO wa_kna1

WHERE kunnr = v_kunnr.

IF sy-subrc NE 0.

MESSAGE i000(z50875_msgclass) WITH text-001.

LEAVE TO SCREEN '0100'.

ENDIF.

ENDMODULE. " VALIDATE_KUNNR INPUT

Former Member
0 Kudos

Hi,

In PBO of Status_1st screen.

Validate ur matnr field.

in PAI of 1st screen

Call ur 2nd screen, and assign ur corresponding fields.. to screen elements.

then for F4 help write 1st screen flow logic

after PAI,

process on value-request.

field ur-screenfield module module- name.

then write ur f4 help code in that module-name..using popup Function modules.

Former Member
0 Kudos

You can use the commands SET/GET PARAMETER 'MAT'

it's use for data element matnr.

SET PARAMETER ID 'MAT' FIELD field.

GET PARAMETER ID 'MAT' ID field.