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

Dynamic Module Pool Screen

Former Member
0 Likes
1,155

Hi all,

In ALV Report output,

final internal table created with create dynamic internal table method.

Now if users double click on a particular row .

then pop up user entry screen should appear with all columns availble in that dynamic alv.

user will enter the information and click on save .

Then that info should save like this

main document number

fieldname

value

in Z table.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
758

After giving the logic for ALV,

Call screen 9002.

In screen 9002's PAI, give

MODULE USER_COMMAND_9002.

CASE sy-ucomm.

WHEN 'SAVE'.

DATA : msgstr TYPE string.

SELECT SINGLE *

FROM <internal table>

INTO <work area> .

UPDATE <internal table> FROM <work area>.

CLEAR msgstr.

CONCATENATE 'Main Document' wa-doc_number 'in Ztable<z table name>.' INTO msgstr SEPARATED BY space.

IF sy-subrc = 0 .

MESSAGE i002(sy) WITH msgstr.

ENDIF.

Hope it helps.

3 REPLIES 3
Read only

Former Member
0 Likes
758

Can any one try this and help

GENERATE DYNPRO h f e m ID g.

Effect

The screen specified in the field g is generated.

The source is taken from the structure h and the internal tables f, e, and m. The field h (=screen header) should correspond to the structure D020S, the internhal table f (=field list) should correspond to the structure D021S, the internal table e (=flow logic) should correspond to the structure D022S, and the internal table m (=Matchcodeinfo) should correspond to the structure D023S.

The error message is stored in the field f1 when a syntax error occurs.

The number of the incorrect line is stored in the field f2 when a syntax error occurs.

By querying the return value, it is possible to determine whether this line refers to the flow logic or the field list.

The incorrect word is stored in the field f3 when a syntax error occurs.

Return Value

SY-SUBRC = 0:

The screen was generated.

SY-SUBRC <> 0:

The screen could not be generated.

SY-SUBRC = 4:

The specified error position is in the flow logic.

SY-SUBRC = 8:

The specified error position is in the field list.

Read only

Former Member
0 Likes
759

After giving the logic for ALV,

Call screen 9002.

In screen 9002's PAI, give

MODULE USER_COMMAND_9002.

CASE sy-ucomm.

WHEN 'SAVE'.

DATA : msgstr TYPE string.

SELECT SINGLE *

FROM <internal table>

INTO <work area> .

UPDATE <internal table> FROM <work area>.

CLEAR msgstr.

CONCATENATE 'Main Document' wa-doc_number 'in Ztable<z table name>.' INTO msgstr SEPARATED BY space.

IF sy-subrc = 0 .

MESSAGE i002(sy) WITH msgstr.

ENDIF.

Hope it helps.

Read only

0 Likes
758

How to create that screen 9002.

As the fields are dynamic.

fields are created during run time