Skip to Content
0
Former Member
Sep 09, 2010 at 09:56 AM

issue on table control in module pool programming

23 Views

Hi all,

I have developed a module pool program,

1) Scenario:

I have two input fields like invoice document number and fiscal year , in table control and fetch the relavant record form Rseg and Rbkp standard tables.into the table control.

when i give input for first time in table contro,l iam able to fetch the record from standard tables.

2) problem:

but for second input, the screen is going into display mode,and not getting the record.

3) logic i have used in PBO:

MODULE status_6666 OUTPUT.

SET PF-STATUS 'ZCFORM'.

SET TITLEBAR 'TITLE'.

n_num = 0.

IF sy-ucomm IS INITIAL.

sy-ucomm = 'CREATE'.

ENDIF.

  • To make internal number and year disappear in the initial screen

CASE sy-ucomm.

WHEN 'CREATE' or 'ENTER' or'SAVE'.

LOOP AT SCREEN.

IF screen-group1 = 'CF2'.

screen-active = 0.

  • screen-input = 0.

ELSE.

screen-active = 1.

  • screen-input = 1.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

  • clear sy-ucomm.

WHEN 'DISP'.

LOOP AT SCREEN.

IF screen-GROUP1 = 'CF2'.

screen-inpUt = 1.

ELSE.

screen-input = 0.

ENDIF.

clear: zcformheader-cfnum ,zcformheader-cfdate , zcformheader-cftype.

clear zcformitem.

MODIFY SCREEN.

IF ZCFORMHEADER-CBELNR = ''.

MESSAGE I000(0) WITH 'PLEASE ENTER CFORM REFERNCE NUMBER'.

ELSEIF ZCFORMHEADER-CGJAHR = ''.

MESSAGE I000(0) WITH 'PLEASE ENTER INTERNALLY GENERATED YEAR'.

ENDIF.

ENDLOOP.

WHEN 'DELETE'.

LOOP AT SCREEN.

IF screen-GROUP1 = 'CF2'.

screen-inpUt = 1.

ELSE.

screen-input = 0.

ENDIF.

clear: zcformheader-cfnum ,zcformheader-cfdate , zcformheader-cftype.

clear zcformitem.

MODIFY SCREEN.

ENDLOOP.

endcase.

ENDMODULE. " STATUS_6666 OUTPUT

Thanks & Regards,

Namratha vasireddy.