‎2008 Nov 28 10:57 AM
In my Scenario In the first screen i have cust No and a display button .
in the 2nd screen i have a table control where i have to display records based on custid.
Following is my code in the first screen(No:100)
WHEN 'DISP'.
clear it_cef.
clear wa_cef.
SELECT MANDT
CUST_NO
EVAL_DATE
CUST_NAME
FLAT_NO
PROJECT_NAME
ELIGIBILITY
ALLOCATED
ACHEIVABLE
FROM ZCUST_EF
INTO table it_CEF
WHERE CUST_NO = ZCUST_EF-CUST_NO .
loop at it_cef to wa_cef.
*move wa_CEF-cust_no to ZCUST_EF-cust_no.
*move wa_CEF-EVAL_DATE to ZCUST_EF-EVAL_DATE.
*move wa_CEF-cust_name to ZCUST_EF-cust_name.
*move wa_CEF-FLAT_NO to ZCUST_EF-FLAT_NO.
*move wa_CEF-PROJECT_NAME to ZCUST_EF-PROJECT_NAME.
**move wa_CEF-ELIGIBILITY to ZCUST_EF-ELIGIBILITY.
*move wa_CEF-ALLOCATED to ZCUST_EF-ALLOCATED.
**move wa_CEF-ACHEIVABLE to ZCUST_EF-ACHEIVABLE.
endloop.
At least help me with the simple example which resolves my Query
‎2008 Nov 28 11:01 AM
Hi
Declare all the variables in top include
try this simple code make sure all the screen field names are same as that you declare in the TOP include
in PAI
CASE ok_code
when 'DISP'.
SELECT * -
CALL SCREEN 200.
endcase.
in PBO of second screen
loop at itab2 with control tc.
endloop
Regards
Ramchander rao.K
‎2008 Nov 28 11:01 AM
Hi
Declare all the variables in top include
try this simple code make sure all the screen field names are same as that you declare in the TOP include
in PAI
CASE ok_code
when 'DISP'.
SELECT * -
CALL SCREEN 200.
endcase.
in PBO of second screen
loop at itab2 with control tc.
endloop
Regards
Ramchander rao.K
‎2008 Nov 28 11:10 AM
PBO (second screen)
loop at itab with control <table control>
module PBO
endloop
PAI
module
loop at itab
endloop.
try doing this
u might get the result
‎2008 Nov 28 11:19 AM
Hi,
Check this Code..
PROCESS BEFORE OUTPUT.
Module to fetch data from the database
SELECT MANDT
CUST_NO
EVAL_DATE
CUST_NAME
FLAT_NO
PROJECT_NAME
ELIGIBILITY
ALLOCATED
ACHEIVABLE
FROM ZCUST_EF
INTO table it_CEF
WHERE CUST_NO = ZCUST_EF-CUST_NO .
LOOP AT it_CEF-
INTO g_val_destin_main_wa -
Workarea
WITH CONTROL val_destin_main -
Table Control
CURSOR val_destin_main-current_line.
Module to move data from work area to the Table control
move wa_CEF-cust_no to ZCUST_EF-cust_no.
*move wa_CEF-EVAL_DATE to ZCUST_EF-EVAL_DATE.
*move wa_CEF-cust_name to ZCUST_EF-cust_name.
*move wa_CEF-FLAT_NO to ZCUST_EF-FLAT_NO.
*move wa_CEF-PROJECT_NAME to ZCUST_EF-PROJECT_NAME.
**move wa_CEF-ELIGIBILITY to ZCUST_EF-ELIGIBILITY.
*move wa_CEF-ALLOCATED to ZCUST_EF-ALLOCATED.
**move wa_CEF-ACHEIVABLE to ZCUST_EF-ACHEIVABLE.
Module to get total line displayed
g_val_destin_main_lines = sy-loopc.
Module to decide the Display/Hide characteristics on screen '0110'
MODULE display_tab.
ENDLOOP.
‎2008 Nov 28 11:27 AM
Hi Pranu,
WHEN 'DISP'.
clear it_cef.
clear wa_cef.
SELECT MANDT
CUST_NO
EVAL_DATE
CUST_NAME
FLAT_NO
PROJECT_NAME
ELIGIBILITY
ALLOCATED
ACHEIVABLE
FROM ZCUST_EF
INTO table it_CEF
WHERE CUST_NO = ZCUST_EF-CUST_NO .
Call Screen 200.in the flow logic of screen 200. write the follwoing statements
PROCESS BEFORE OUTPUT.
LOOP AT it_cef INTO wa_cef WITH CONTROL<table Control name defined in top include>l.
MODULE disp_data.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP.
ENDLOOP.
*&---------------------------------------------------------------------*
*& Module disp_data OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE disp_data OUTPUT.
ZCUST_EF-MANDT. = wa_cef-MANDT.
'
'
'
'
ZCUST_EF-ACHEIVABLE = wa_cef-ACHEIVABLE
ENDMODULE. " disp_data OUTPUTThanks & Regards
‎2008 Nov 28 12:03 PM