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

Output only screen field problem - module pool

Former Member
0 Likes
1,734

I want to display site descriptoin behind the site number and the article description behind the article number after I input the site /article number and press ENTER.

That is:

Site : 9999 Site Name

Article: 1111 Aritle Description

I create a view contains site/site name/article/article description, and make site and article are input/output screen fields, but site name and article description are output only screen fields.

When I execute the program, i input the site and article then Enter, the program execute but the site name/article are not shown

What is the problem?! the view or screen fields?

Thanks in Advance

4 REPLIES 4
Read only

raja_thangamani
Active Contributor
0 Likes
861

Keep the <b>SAME Variable name</b> on report & Screen field. It will solve your problem.

Raja T

Read only

Former Member
0 Likes
861

Leo,

design the like below.

1.Text field & Label field

2.Declare the same names(names of the above fields) of the fields in ABAP editor

3.In PAI take the input values and pass the values to concerned fields.

Read only

Former Member
0 Likes
861

Hi Leo,

Check out this code. This is working fine.

*-- Data Declarations :

DATA : i_dynfields TYPE STANDARD TABLE OF dynpread WITH HEADER LINE.

DATA: ws_repid TYPE d020s-prog,

ws_num TYPE d020s-dnum,

cvp_desc LIKE zcvpconfig-cvp_desc, " Same as screen name

cvp_no LIKE zcvpconfig-cvp_num. "Same as screen name

PROCESS AFTER INPUT.

MODULE user_command_0100.

      • input check for field cvp number

<b>FIELD : cvp_no.

MODULE show_cv_desc</b>.

The module definition for show_cv_desc as follows :

&----


*& Module show_cv_desc INPUT

&----


  • text

----


MODULE show_cv_desc INPUT.

ws_repid = sy-cprog.

ws_num = '1000'.

i_dynfields-fieldname = 'CVP_NO'.

APPEND i_dynfields.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = ws_repid

dynumb = ws_num

TABLES

dynpfields = i_dynfields

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.

IF sy-subrc EQ 0.

READ TABLE i_dynfields WITH KEY fieldname = 'CVP_NO'.

IF sy-subrc EQ 0.

cvp_no = i_dynfields-fieldvalue.

ENDIF.

ENDIF.

<b>loop at screen.

if screen-name = 'CVP_DESC'.

if cvp_no = '0012'.

cvp_desc = 'SATYA'.

elseif cvp_no = '0014'.

cvp_desc = 'PRIYA'.

endif.

modify screen.

endif.

endloop.</b>ENDMODULE. " show_cv_desc INPUT

Hope this will help u.

Read only

Former Member
0 Likes
861

in enter fn code in PAI of the screen select the data from view.

if you are trying to display in list in the second screen you have to use

LEAVE TO LIST-PROCESSING.

Addition:

... AND RETURN TO SCREEN scr.

above command here you can use write statement and all other things like report.

if it is not like so then check view contains any data or not.

regards

shiba dutta