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

need experts in dialog programming issue

Former Member
0 Likes
343

Hi Experts,

i am facing a strange problem. in dialog programming i have a TABLE CONTROL in which

user will input the data and finally it will save in z table.

everything is going fine except when user pressing enter , data being washed out from the screen.

means if he is filling 2 lines in Tb control and press enter then data be washout and showing empty table control with 2 lines active and rest of inactive.

data is coming into internal table properly in PAI and finally in pbo i am taking a loop on internal table and passing the data to the work area of the screen line by line.

screen-name of the table control is also passing in the same wa_itab that i am using in abap code.

screen element is same as work area and internal table .

please suggest me the any clue .

Edited by: vijay dwivedi on Jun 2, 2009 2:31 AM

2 REPLIES 2
Read only

Former Member
0 Likes
316

code is below

PROCESS BEFORE OUTPUT.

MODULE TC_CONTROL.

LOOP AT it_data

INTO wa_data

WITH CONTROL tc_control

CURSOR tc_control-current_line.

MODULE tc_control_get_lines.

ENDLOOP.

MODULE CLEAR_SCR.

PROCESS AFTER INPUT.

MODULE EXIT AT EXIT-COMMAND.

MODULE CLEAR_SCREEN.

LOOP AT IT_DATA.

CHAIN.

FIELD WA_DATA-FREPS_N.

FIELD WA_DATA-TOEPS_N.

FIELD WA_DATA-PRCH_A.

FIELD WA_DATA-SRVC_AMT .

FIELD WA_DATA-ACCNT_C.

FIELD WA_DATA-AMT_D.

FIELD WA_DATA-NARR_X.

FIELD WA_DATA-CRPRD_N.

MODULE tc_control_modify ON CHAIN-REQUEST.

ENDCHAIN.

ENDLOOP.

MODULE USER_SAVE_DATA.

*********************************************************************************************

MODULE tc_control_get_lines OUTPUT.

g_tc_controls_lines = sy-loopc.

ENDMODULE. " tc_control_get_lines OUTPUT

MODULE CLEAR_SCR OUTPUT.

IF SY-UCOMM = 'REFR'.

LOOP AT SCREEN.

SCREEN-OUTPUT = 0.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

MODULE EXIT INPUT.

OK_CODE = SY-UCOMM.

IF OK_CODE = 'BACK' OR OK_CODE = 'ENTR'.

CLEAR OK_CODE.

ENDIF.

CASE OK_CODE.

WHEN 'EXIT' OR 'C ANC' OR 'BCK'.

LEAVE TO SCREEN 0.

ENDCASE.

ENDMODULE. " EXIT INPUT

MODULE CLEAR_SCREEN INPUT.

OK_CODE = SY-UCOMM.

IF SY-UCOMM = 'REFR'.

LOOP AT SCREEN.

SCREEN-OUTPUT = 0.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

IF OK_CODE = 'ENTR'.

LOOP AT SCREEN.

IF SCREEN-NAME = 'OK_CODE'.

SCREEN-ACTIVE = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

MODULE tc_control_modify INPUT.

move-corresponding WA_DATA to it_data.

*MODIFY it_data

  • FROM wa_data

  • INDEX tc_control-current_line.

  • indeX SY-STEPL.

append wa_data to it_data.

ENDMODULE. " tc_control_modify INPUT

MODULE USER_SAVE_DATA INPUT.

loop at it_data into wa_data.

modify it_data from wa_data.

endloop.

Thanks in advance

vijay dwivedi

Read only

Former Member
0 Likes
316

Hi,

In PAI

loop at it_zsdpm .

MODULE populate_data.

endloop.

MODULE populate_data INPUT.

DESCRIBE TABLE it_zsdpm LINES v_tlines.

IF v_tlines GE tc-current_line.

MODIFY it_zsdpm FROM wa_zsdpm INDEX tc-current_line .

ELSE.

APPEND wa_zsdpm TO it_zsdpm.

ENDIF.

ENDMODULE.