‎2008 Sep 01 1:17 PM
Dear All
I have created a Table Control "ZAMT" on a screen with following code. I have also created a structure name ZCNG_PAYMENT from se11 and use fields of this structure to create table control on screen. But when I enters value in table data is not passing to Program in PAI and from Program to Table in PBO.
PROCESS BEFORE OUTPUT.
LOOP WITH CONTROL ZAMT.
MODULE FILL_TABLE_CONTROL.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP WITH CONTROL ZAMT.
MODULE FILL_TABLE_CONTROL.
ENDLOOP.
////////////////////////////////////////////////
DATA: BEGIN OF ZCNG_PAYMENT,
MANDT TYPE ZCNG_PAYMENTS-MANDT,
CDPNO TYPE ZCNG_PAYMENT-CDPNO,
SEQNR TYPE ZCNG_PAYMENT-SEQNR,
ZMONTH TYPE ZCNG_PAYMENT-ZMONTH,
PAMT TYPE ZCNG_PAYMENT-PAMT,
END OF ZCNG_PAYMENT.
DATA: BEGIN OF ZCNG_PAYMENTSI OCCURS 0,
MANDT TYPE ZCNG_PAYMENTS-MANDT,
CDPNO TYPE ZCNG_PAYMENTS-CDPNO,
SEQNR TYPE ZCNG_PAYMENTS-SEQNR,
ZMONTH TYPE ZCNG_PAYMENT-ZMONTH,
PAMT TYPE ZCNG_PAYMENTS-PAMT,
END OF ZCNG_PAYMENTSI.
CONTROLS ZAMT TYPE TABLEVIEW USING SCREEN 9002.
*&---------------------------------------------------------------------*
*& Module FILL_TABLE_CONTROL OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE FILL_TABLE_CONTROL OUTPUT.
READ TABLE ZCNG_PAYMENTSI INTO ZCNG_PAYMENT INDEX ZAMT-current_line.
ENDMODULE. " FILL_TABLE_CONTROL OUTPUT
*&---------------------------------------------------------------------*
*& Module FILL_TABLE_CONTROL INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE FILL_TABLE_CONTROL INPUT.
MODIFY ZCNG_PAYMENTSI FROM ZCNG_PAYMENT INDEX ZAMT-current_line.
ENDMODULE. " FILL_TABLE_CONTROL INPUT
‎2008 Sep 02 7:25 AM
Hi
use table control with wizard and in that after chain ....enchain in PAI u can write the code for updating DB.
regards
vivek
‎2008 Sep 01 1:19 PM
‎2008 Sep 01 1:31 PM
Hi,
If you want to display the data that you have fetched you have to write it in PBO only.
so write th code that you have written here only in PBO and not in PAI.
Hope this helps.
Thanks,
Rashmi.
‎2008 Sep 01 1:37 PM
Hi,
Use
PBO.
Loop at itab into wa with control tc.
module give_data_to_tc.
endloop.
PAI.
loop at itab.
module get_data_from_tc.
endloop.
‎2008 Sep 02 3:10 AM
Thanks For your comments.
Issue Resolved. I didnt declare
Table:ZCNG_PAYMENTS
due to which values were not passing to screen.
‎2008 Sep 02 7:25 AM
Hi
use table control with wizard and in that after chain ....enchain in PAI u can write the code for updating DB.
regards
vivek