09-22-2008 12:12 PM
hii everyone,
I created a report calling screen,made in screen painter but it is not displaying the output.
what could be the problem?
09-22-2008 12:14 PM
09-22-2008 12:18 PM
09-23-2008 5:21 AM
09-23-2008 5:25 AM
Hi,
Did you write any flow logic statements for the screen?
uncomment the module in the flow logic of teh screen create the modules and then write your code in the PBO and PAI modules .
Use call screen statement in the report when ever you want to call the screen.
09-23-2008 5:33 AM
Hi first you create you main program .in that program you use
call screen 101. and give double click on screen no., it will navigate you to screen painter .now you create your screen.
09-23-2008 5:37 AM
hii Swati,
ya this is wat i did.
i wrote the code in abap editor not in the flow logic.
Edited by: daksh4u on Sep 23, 2008 12:38 AM
09-23-2008 5:42 AM
Ok,
have you called that module in your PAI.?
TO CALL MODULE YOU WRITE IN PAI AS.
MODULE <NAME>.
Edited by: swati gupta on Sep 23, 2008 6:50 AM
09-23-2008 5:46 AM
Hi,
u have called the screen in your report i guess .
you have to write the logic for the screen in flow logic of the screen that is write code for PBO and PAI and activate the screen .
this will solve your problem.
Edited by: Gayatri Hemnur on Sep 23, 2008 6:47 AM
09-23-2008 6:09 AM
okk let me tell u wat i did.
i started with abap editor,
call screen 0001 in report n double clicked it,
screen painter opened,made layout
went to flow logic,double clicked on module status below PBO,selected the main program n wrote the code in abap editor
My layout is like.
material code
matarial type
material group
Pushbutton:
display
save
exit
the report is running correctly, but when i fill in the material code i want its type n group to be displayed,which i m not getting.
hope u ppl understood.
Edited by: daksh4u on Sep 23, 2008 1:11 AM
09-23-2008 6:28 AM
Hi ,
u need to use funtion module 'DYNP_VALUES_READ' , as the values on the screen can not be read till u execute some event to get it populated automatically , u should use this fn module in process on value request and keep a drop down to ur mat group etc fields . So when u enter ur material and enter that will dispaly ur group an other fields based on the logic tht u write in ur POV module.
Find the sample code if u need.
module module_state input.
REFRESH IT_STATE.
Search help for state .
SELECT bland bezei FROM t005u INTO TABLE it_state
WHERE land1 = 'IN' AND spras ='EN'.
DELETE ADJACENT DUPLICATES FROM it_state COMPARING bland.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BLAND'
dynpprog = sy-repid
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = it_state.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
endmodule. " module_state INPUT
&----
*& Module module_city INPUT
&----
text
----
module module_city input.
REFRESH IT_CITY.
dynfields-fieldname = 'P_STATE'.
APPEND dynfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-cprog
dynumb = sy-dynnr
translate_to_upper = 'X'
TABLES
dynpfields = dynfields
EXCEPTIONS
OTHERS = 11.
READ TABLE dynfields WITH KEY fieldname = 'P_STATE'.
p_state = dynfields-fieldvalue.
SELECT state city FROM zcrm_area INTO TABLE it_city WHERE state = p_state.
SORT it_city BY state city.
DELETE ADJACENT DUPLICATES FROM it_city COMPARING STATE city.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CITY'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_CITY'
value_org = 'S'
TABLES
value_tab = it_city.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
endmodule. " module_city INPUT
&----
*& Module module_area INPUT
&----
text
----
module module_area input.
REFRESH : it_AREA , IT_CITY.
REFRESH dynfields.
dynfields-fieldname = 'P_CITY'.
APPEND dynfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-cprog
dynumb = sy-dynnr
translate_to_upper = 'X'
TABLES
dynpfields = 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.
READ TABLE dynfields WITH KEY fieldname = 'P_CITY'.
p_city = dynfields-fieldvalue.
SELECT city area FROM zcrm_area INTO TABLE it_area
WHERE state = p_state AND city = p_city.
SORT it_area BY area.
DELETE ADJACENT DUPLICATES FROM it_area COMPARING area.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'AREA'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_AREA'
value_org = 'S'
TABLES
value_tab = it_area.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
endmodule. " module_area INPUT
&----
*& Module module_sarea INPUT
&----
text
----
module module_sarea input.
REFRESH : it_area , IT_SAREA.
REFRESH dynfields.
dynfields-fieldname = 'P_AREA'.
APPEND dynfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-cprog
dynumb = sy-dynnr
translate_to_upper = 'X'
TABLES
dynpfields = 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.
**Find out the Value of P_VBELN
READ TABLE dynfields WITH KEY fieldname = 'P_AREA'.
p_area = dynfields-fieldvalue.
SELECT area subarea FROM zcrm_area INTO TABLE it_sarea
WHERE state = p_state AND city = p_city AND area = p_area.
SORT it_sarea BY sarea.
DELETE ADJACENT DUPLICATES FROM it_sarea COMPARING sarea.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'SUBAREA'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_SAREA'
value_org = 'S'
TABLES
value_tab = it_sarea.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
endmodule. " module_sarea INPUT