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

table control .

Former Member
0 Likes
657

Hello expert ,

I am designing one module pool like vx11n in the one table control there in document tab . I habe to make like that , I had thet design but prob is that data is disappenr when I pressing the enter . I have to make like standard coding but m not getting ..........

standard coding is like this ..,

in pbo .

MODULE DISPLAY .

PROCESS BEFORE OUTPUT.

  • MODULE STATUS_0613.

LOOP WITH CONTROL TC_EXPORT_DOCUMENTS.

  • MODULE FIELDSELECT_DOCU_ENJOY99.

ENDLOOP.

PROCESS AFTER INPUT.

  • MODULE USER_COMMAND_0613.

LOOP WITH CONTROL TC_EXPORT_DOCUMENTS.

CHAIN.

  • FIELD AKKD-EXDOK.

FIELD RV86E-TXT_DOK.

FIELD AKKD-EDOAZ.

FIELD AKKD-EDKAZ.

FIELD AKKD-ERLED.

ENDCHAIN.

  • MODULE DOC_TO_INT.

ENDLOOP.

I have created one module in pbo module display , but data is appering after pressing any key , screen is going refresh .

please guide me , M waiting for ur valuable guide .

Regards ,

Joy .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
602

Hello Joy,

Follow the same as that of standard with a few modification as below coz in standard lot of things are included which can't be followed in normal development.

PROCESS BEFORE OUTPUT.

  • MODULE STATUS_0613.

MODULE DISPLAY .

loop with TC_EXPORT_DOCUMENTS cursor TC_EXPORT_DOCUMENTS-current_line.

  • MODULE FIELDSELECT_DOCU_ENJOY99.

ENDLOOP.

PROCESS AFTER INPUT.

  • MODULE USER_COMMAND_0613.

MODULE refresh_internal_table.

LOOP WITH CONTROL TC_EXPORT_DOCUMENTS.

CHAIN.

  • FIELD AKKD-EXDOK.

FIELD RV86E-TXT_DOK.

FIELD AKKD-EDOAZ.

FIELD AKKD-EDKAZ.

FIELD AKKD-ERLED.

ENDCHAIN.

module capture_the_fields.

  • MODULE DOC_TO_INT.

ENDLOOP.

-


Module capture_the_fields.

move the screen data to wa.

appent wa to internal table.

endmodule.

-


the internal table is the table which contains the data to be displayed.

In standard we use chain endchain sometimes to hold the screen data. Sometimes this screen fields get refreshed automatically to retain the data we protect this data using CHAIN ENDCHAIN without a module in it.

Hope this helps and pulls you out of your problem.

Cheers,

Suvendu.

5 REPLIES 5
Read only

Former Member
0 Likes
602

Probably you need to modify the screen fields (table control fields) in PBO> Otherwise it'll be vanished. You can not hold the entries in the table control.

http://www.sapdb.info/wp-content/uploads/2008/05/create-table-control.pdf

Read only

Former Member
0 Likes
602

Hi the code should be like this........

PROCESS BEFORE OUTPUT.

  • MODULE STATUS_0613.

MODULE DISPLAY .

loop with TC_EXPORT_DOCUMENTS cursor

TC_EXPORT_DOCUMENTS-current_line.

  • MODULE FIELDSELECT_DOCU_ENJOY99.

ENDLOOP.

PROCESS AFTER INPUT.

  • MODULE USER_COMMAND_0613.

LOOP WITH CONTROL TC_EXPORT_DOCUMENTS.

CHAIN.

  • FIELD AKKD-EXDOK.

FIELD RV86E-TXT_DOK.

FIELD AKKD-EDOAZ.

FIELD AKKD-EDKAZ.

FIELD AKKD-ERLED.

ENDCHAIN.

  • MODULE DOC_TO_INT.

ENDLOOP.

Regards

Sajid

Read only

Former Member
0 Likes
602

hi

try this reference example

controls : control type tableview using screen <scrno>.

data : begin of itab occurs 0,

tablecontrol columns here.........

end of itab.

data : itab1 like itab occurs 0 with header line.

in se51

PBO

Loop with control <tcname>

Module_fill_tc.

endloop.

PAI

Loop with control <tcname>

Module read_tc.

endloop.

in se38

Module_fill_tc.

describe table itab1 lines n.

if n is not initial.

read table itab1 into itab index control-currentline.

endif.

endmodule.

Module read_tc.

read table itab1 index control-currentline.

if sy-subrc = 0.

modify itab1 from itab index control-currentline.

else.

move-corresponding itab to itab1.

append itab1.

endif.

endmodule.

Regards

Read only

Former Member
0 Likes
602

Hi Joy,

you need to append the table control contents to internal table then only it won't dissappear when you press enter or trigger some actions,

just follow the example,

give this in the pai loop and endloop by creating some module in pai.

IF NOT x_assignment-employee_id IS INITIAL AND NOT x_assignment-activity IS INITIAL.

MODIFY t_assignment FROM x_assignment INDEX tablecontrol-current_line.

IF sy-subrc NE 0.

APPEND x_assignment TO t_assignment.

ENDIF.

ENDIF.

Read only

Former Member
0 Likes
603

Hello Joy,

Follow the same as that of standard with a few modification as below coz in standard lot of things are included which can't be followed in normal development.

PROCESS BEFORE OUTPUT.

  • MODULE STATUS_0613.

MODULE DISPLAY .

loop with TC_EXPORT_DOCUMENTS cursor TC_EXPORT_DOCUMENTS-current_line.

  • MODULE FIELDSELECT_DOCU_ENJOY99.

ENDLOOP.

PROCESS AFTER INPUT.

  • MODULE USER_COMMAND_0613.

MODULE refresh_internal_table.

LOOP WITH CONTROL TC_EXPORT_DOCUMENTS.

CHAIN.

  • FIELD AKKD-EXDOK.

FIELD RV86E-TXT_DOK.

FIELD AKKD-EDOAZ.

FIELD AKKD-EDKAZ.

FIELD AKKD-ERLED.

ENDCHAIN.

module capture_the_fields.

  • MODULE DOC_TO_INT.

ENDLOOP.

-


Module capture_the_fields.

move the screen data to wa.

appent wa to internal table.

endmodule.

-


the internal table is the table which contains the data to be displayed.

In standard we use chain endchain sometimes to hold the screen data. Sometimes this screen fields get refreshed automatically to retain the data we protect this data using CHAIN ENDCHAIN without a module in it.

Hope this helps and pulls you out of your problem.

Cheers,

Suvendu.