Data insert through module pool programming

hi
I want to insert the data  into the data base through module pool programming.I am taking the fields from different tables, I need sample code ,please help me

Hi Dhanunjay,
REPORT zpe_str_le .
TABLES : zpe_str , zprd_mis1 , mseg , t001l.
*DATA : STR TYPE C VALUE '50'.
data : text(100) VALUE 'DELETED STORAGE LOCATION NO '.
SELECTION-SCREEN : BEGIN OF SCREEN 123 AS WINDOW TITLE TEXT-005.
SELECT-OPTIONS : S_ZSLOC FOR ZPE_STR-ZSLOC,
S_ZMACD FOR ZPE_STR-ZMACD,
S_ZPGRP FOR ZPE_STR-ZPGRP.
SELECTION-SCREEN : END OF SCREEN 123.
DATA : flag(1) TYPE c,
flag1 TYPE c ,
flag3 TYPE c VALUE '1'.
DATA : etab LIKE t001l OCCURS 0 WITH HEADER LINE.
SELECT * FROM T001L INTO TABLE ETAB.
DATA : ihead LIKE thead.
DATA : prevtab LIKE tline OCCURS 0 WITH HEADER LINE.
data : Jtab like TLINE occurs 0 with header line.
DATA : jtab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA : itab LIKE zprd_mis1 OCCURS 0 WITH HEADER LINE.
*SELECT * FROM zprd_mis1 INTO TABLE itab.
DATA : BEGIN OF itab_sloc OCCURS 0,
werks LIKE t001l-werks,
lgort LIKE t001l-lgort,
lgobe LIKE t001l-lgobe,
END OF itab_sloc.
*FLAG = 0.
CALL SCREEN 100.
MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN 'RET'.
LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 100.
*PERFORM PREVIEW.
LOOP AT prevtab.
WRITE : / prevtab.
ENDLOOP.
LOOP AT JTAB[] INTO ZPRD_MIS1.
WRITE : Jtab-TDFORMAT.
WRITE : Jtab-TDLINE .
*********ZPRD_MIS1-MANDT = Jtab-TDLINE .
*********ZPRD_MIS1-SLOC = Jtab-TDLINE .
*********ZPRD_MIS1-MCODE = Jtab-TDLINE .
*********ZPRD_MIS1-GCODE = Jtab-TDLINE .
*********ZPRD_MIS1-DESCR = Jtab-TDLINE .
*********INSERT ZPRD_MIS1.
ENDLOOP.
WRITE : JTAB-ZSLOC.
*********CALL TRANSACTION 'SO10'.
SET CURSOR 2 2.
WHEN 'DET'.
SELECT * FROM ZPRD_MIS1 INTO CORRESPONDING FIELDS OF TABLE ITAB.
CALL SCREEN 123 STARTING AT 10 5.
LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
SKIP 2 .
WRITE :/1(8) 'STR.LOC' ,10(15) 'MRP. CTLR',27(10) 'P.GRP' ,39(40) 'DESCRIPTION OF PRODUCT'.
SELECT SLOC MCODE GCODE DESCR FROM zprd_mis1 INTO ZPRD_MIS1 WHERE SLOC IN S_ZSLOC AND
MCODE IN S_ZMACD AND
GCODE IN S_ZPGRP.
WRITE :/1(8) zprd_mis1-SLOC ,10(15) zprd_mis1-MCODE ,27(10) zprd_mis1-GCODE ,39(40) zprd_mis1-DESCR .
ENDSELECT.
WHEN 'CLEAR'.
flag = 4.
IF zpe_str-zsloc NE ' '.
CLEAR zpe_str.
ELSE.
MESSAGE 'ALREADY CLEARED' TYPE 'S'.
ENDIF.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
WHEN 'SAVE'.
IF zpe_str-zdesc NE ' '.
IF zpe_str-zsloc NE ' '.
LOOP AT itab.
READ TABLE itab WITH KEY sloc = zpe_str-zsloc .
IF sy-subrc = 0 AND flag = 5.
zprd_mis1-mandt = sy-mandt.
zprd_mis1-sloc = zpe_str-zsloc .
zprd_mis1-mcode = zpe_str-zmacd .
zprd_mis1-gcode = zpe_str-zpgrp.
zprd_mis1-descr = zpe_str-zdesc .
MODIFY zprd_mis1.
flag1 = 7.
MESSAGE 'STORAGE LOCATION MODIFIED' TYPE 'S'.
EXIT.
ELSE.
zprd_mis1-mandt = sy-mandt.
zprd_mis1-sloc = zpe_str-zsloc .
zprd_mis1-mcode = zpe_str-zmacd .
zprd_mis1-gcode = zpe_str-zpgrp.
zprd_mis1-descr = zpe_str-zdesc .
INSERT zprd_mis1.
APPEND itab.
flag = 5.
flag1 = 7.
MESSAGE 'STORAGE LOCATION CREATED' TYPE 'S'.
*MESSAGE 'DATA ALREADY SAVED' TYPE 'S'.
EXIT.
*ENDIF.
ENDIF.
ENDLOOP.
ELSE.
flag = 3.
MESSAGE 'PLEASE ENTER THE STORAGE LOCATION' TYPE 'S'.
ENDIF.
ELSE.
LOOP AT itab.
READ TABLE itab WITH KEY sloc = zpe_str-zsloc .
IF sy-subrc = 0.
MESSAGE 'ALREADY SAVED' TYPE 'S'.
ELSE.
MESSAGE 'ENTRIES FOR OTHER FIELDS REQUIRED' TYPE 'S'.
ENDIF.
ENDLOOP.
ENDIF.
WHEN 'CHECK'.
SELECT * FROM zprd_mis1 INTO TABLE itab.
IF zpe_str-zsloc NE ' '.
LOOP AT itab.
READ TABLE itab WITH KEY sloc = zpe_str-zsloc .
IF sy-subrc = 0.
zpe_str-zmandt = itab-mandt.
zpe_str-zsloc = itab-sloc.
zpe_str-zmacd = itab-mcode.
zpe_str-zpgrp = itab-gcode.
zpe_str-zdesc = itab-descr.
flag = 7.
flag1 = 7.
ELSE.
MESSAGE 'NO SUCH STORAGE LOCATION AVAILABLE' TYPE 'S'.
EXIT.
ENDIF.
ENDLOOP.
ELSE.
flag = 3.
MESSAGE 'PLEASE ENTER THE STORAGE LOCATION' TYPE 'S'.
EXIT.
ENDIF.
WHEN 'DELETE'.
IF zpe_str-zsloc EQ ' '.
flag = 3.
MESSAGE 'NOSUCH LOCATION AVAILABLE' TYPE 'S'.
ELSE.
READ TABLE itab WITH KEY sloc = zpe_str-zsloc .
IF sy-subrc = 0.
zpe_str-zmandt = itab-mandt.
zpe_str-zsloc = itab-sloc.
zpe_str-zmacd = itab-mcode.
zpe_str-zpgrp = itab-gcode.
zpe_str-zdesc = itab-descr.
IF zpe_str-zsloc NE ' '.
CALL FUNCTION 'G_CHECK_PASSWORD'
EXPORTING
password = 'PLANT1'
EXCEPTIONS
not_authorized = 1
canceled = 2
OTHERS = 3.
IF sy-subrc = 0.
PERFORM PREVIEW.
DELETE FROM zprd_mis1 WHERE SLOC = zpe_str-zSLOC.
UPDATE zprd_mis1.
APPEND itab.
MESSAGE 'STORAGE LOCATION DELETED' TYPE 'S'.
ELSEIF SY-SUBRC = 2.
MESSAGE 'OPRATION CANCELLED' TYPE 'E'.
ELSEIF SY-SUBRC = 3.
MESSAGE 'UNAUTHORIZED' TYPE 'E'.
ENDIF.
ELSE.
MESSAGE 'STORAGE LOCATION CONTAINS NO DATA' TYPE 'S'.
ENDIF.
ELSE.
MESSAGE 'STORAGE LOCATION CONTAINS NO DATA' TYPE 'S'.
ENDIF.
ENDIF.
WHEN 'CREATE'.
FLAG3 = 12.
IF zpe_str-zsloc EQ ' '.
MESSAGE 'ENTER THE STORAGE LOCATION' TYPE 'S'.
EXIT.
ELSE.
LOOP AT etab.
READ TABLE etab WITH KEY lgort = zpe_str-zsloc .
IF sy-subrc = 0.
read table itab with key sloc = zpe_str-zsloc .
if sy-subrc = 0.
zpe_str-zmandt = itab-mandt.
zpe_str-zsloc = itab-sloc.
zpe_str-zmacd = itab-mcode.
zpe_str-zpgrp = itab-gcode.
zpe_str-zdesc = itab-descr.
flag = 7.
flag1 = 7.
clear flag .
clear flag1.
message 'storage location alredy exist' type 'S'.
ELSE.
FLAG = 2.
MESSAGE 'STORAGE LOCATION ENTIRES DOESNOT EXIST' TYPE 'S'.
ENDIF.
else.
message 'no such storage location exist' type 'S'.
endif.
endloop.
FLAG = 2.
exit.
endif.
WHEN 'CHANGE'.
SELECT * FROM zprd_mis1 INTO TABLE itab.
IF zpe_str-zsloc NE ' '.
LOOP AT itab.
READ TABLE itab WITH KEY sloc = zpe_str-zsloc .
IF sy-subrc = 0.
flag = 5.
flag1 = 6.
zpe_str-zmandt = itab-mandt.
zpe_str-zsloc = itab-sloc.
zpe_str-zmacd = itab-mcode.
zpe_str-zpgrp = itab-gcode.
zpe_str-zdesc = itab-descr.
ELSE.
MESSAGE 'NO STORAGE LOCATION AVAILABLE' TYPE 'S'.
ENDIF.
ENDLOOP.
ELSE.
flag = 3.
MESSAGE 'PLEASE ENTER THE STORAGE LOCATION' TYPE 'S'.
ENDIF.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module STATUS_0100 OUTPUT
text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'AAA'.
SET TITLEBAR 'aaa'.
IF flag3 = '1'.
CALL FUNCTION 'G_CHECK_PASSWORD'
EXPORTING
password = 'PLANT1'
EXCEPTIONS
not_authorized = 1
canceled = 2
OTHERS = 3.
IF sy-subrc 0.
MESSAGE 'un authorized' TYPE 'S'(001).
LEAVE TO SCREEN 0.
ELSEIF SY-SUBRC = 2.
MESSAGE ' OPERATION CANCELLED' TYPE 'S'(001).
LEAVE TO SCREEN 0.
ELSEIF SY-SUBRC = 3.
LEAVE TO SCREEN 0.
MESSAGE 'RESTRICTED' TYPE 'S'(001).
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CLEAR flag3.
ENDIF.
SELECT * FROM zprd_mis1 INTO TABLE itab.
LOOP AT SCREEN.
IF screen-name = 'ZPE_STR-ZDESC' OR screen-name = 'ZPE_STR-ZPGRP' OR screen-name = 'ZPE_STR-ZMACD'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
IF flag = 5 AND flag1 EQ 6.
LOOP AT SCREEN.
IF screen-name = 'ZPE_STR-ZDESC' OR screen-name = 'ZPE_STR-ZPGRP' OR screen-name = 'ZPE_STR-ZMACD'.
screen-input = 1.
MODIFY SCREEN.
ENDIF.
IF screen-name = 'CREATE' OR screen-name = 'DELETE' OR screen-name = 'CHANGE' OR screen-name = 'CHECK'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
EXIT.
ENDIF.
IF flag = 2.
LOOP AT SCREEN.
IF screen-name = 'ZPE_STR-ZDESC' OR screen-name = 'ZPE_STR-ZPGRP' OR screen-name = 'ZPE_STR-ZMACD'.
screen-input = 1.
MODIFY SCREEN.
ENDIF.
IF screen-name = 'CREATE' OR screen-name = 'DELETE' OR screen-name = 'CHANGE' OR screen-name = 'CHECK'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
EXIT.
ENDIF.
IF flag3 = 12.
LOOP AT SCREEN.
IF screen-name = 'ZPE_STR-ZDESC' OR screen-name = 'ZPE_STR-ZPGRP' OR screen-name = 'ZPE_STR-ZMACD'.
screen-input = 1.
MODIFY SCREEN.
ENDIF.
IF screen-name = 'CREATE' OR screen-name = 'DELETE' OR screen-name = 'CHANGE' OR screen-name = 'RET' OR screen-name = 'CHECK'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
EXIT.
CLEAR FLAG3.
ENDIF.
IF flag = 4.
IF screen-name CP 'ZPE_*'.
screen-input = 1.
ENDIF.
ENDIF.
IF flag1 = 7 AND flag = 5.
LOOP AT SCREEN.
IF screen-name = 'ZPE_STR-ZDESC' OR screen-name = 'ZPE_STR-ZSLOC' OR screen-name = 'ZPE_STR-ZPGRP' OR screen-name = 'ZPE_STR-ZMACD'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
IF screen-name = 'CREATE' OR screen-name = 'DELETE' OR screen-name = 'CHECK' OR screen-name = 'SAVE'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
IF flag1 = 7 AND flag = 7.
LOOP AT SCREEN.
IF screen-name = 'ZPE_STR-ZDESC' OR screen-name = 'ZPE_STR-ZSLOC' OR screen-name = 'ZPE_STR-ZPGRP' OR screen-name = 'ZPE_STR-ZMACD'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
IF screen-name = 'CREATE' OR screen-name = 'CHECK' OR screen-name = 'SAVE'." OR screen-name = 'DELETE'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
IF flag1 = 4 AND flag = 3.
LOOP AT SCREEN.
IF screen-name = 'ZPE_STR-ZDESC' OR screen-name = 'ZPE_STR-ZSLOC' OR screen-name = 'ZPE_STR-ZPGRP' OR screen-name = 'ZPE_STR-ZMACD'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
IF screen-name = 'CREATE' OR screen-name = 'SAVE' OR screen-name = 'DELETE' OR screen-name = 'CHANGE' OR screen-name = 'CHECK'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
DATA: BEGIN OF r1 OCCURS 1.
INCLUDE STRUCTURE ddshretval.
DATA: END OF r1.
*& Module VALUE_SLOC INPUT
text
MODULE value_sloc INPUT.
SELECT lgort werks lgobe FROM t001l INTO CORRESPONDING FIELDS OF TABLE itab_sloc.
DELETE ADJACENT DUPLICATES FROM itab_sloc COMPARING lgort.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'LGORT'
value_org = 'S'
TABLES
value_tab = itab_sloc
return_tab = r1
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc EQ 0.
IF r1-fieldval IS NOT INITIAL.
zpe_str-zsloc = r1-fieldval.
ENDIF.
ENDIF.
EXIT.
*ENDSELECT.
ENDMODULE. " VALUE_SLOC INPUT
FORM PREVIEW.
*TABLES : ZPE_STR , ZPRD_MIS1 , MSEG.
data : ihead like thead.
DATA : prevtab like TLINE occurs 0 with header line.
data : Jtab like TLINE occurs 0 with header line.
*data : Jtab like thead occurs 0 with header line.
*data : text(100).
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'ST'
LANGUAGE = sy-langu
NAME = 'ZSLDEL'
OBJECT = 'TEXT'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
LINES = prevtab[]
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
if not prevtab[] is initial.
append lines of prevtab to jtab.
endif.
*IHEAD-TDFDATE = SY-DATUM.
*IHEAD-TDFTIME = SY-UZEIT.
ihead-TDOBJECT = 'TEXT'.
ihead-TDNAME = 'ZSLDEL'.
ihead-TDID = 'ST'.
ihead-TDSPRAS = sy-langu.
type-pools : slis.
Jtab-TDFORMAT = ''.
*Jtab-TDLINE = 'SLOCATION'.
*append Jtab.
*Jtab-TDFORMAT = ''.
Jtab-TDFORMAT = '*'.
Jtab-TDLINE = ZPE_STR-ZSLOC.
append Jtab.
Jtab-TDFORMAT = ''.
*Jtab-TDLINE = 'DATE'.
*append Jtab.
Jtab-TDFORMAT = ''.
*Jtab-TDLINE = SY-DATUM.
*append Jtab.
Jtab-TDFORMAT = ''.
*Jtab-TDLINE = 'TIME'.
*append Jtab.
Jtab-TDFORMAT = ''.
*Jtab-TDLINE = SY-UZEIT.
*Jtab-TDFORMAT = ''.
*append Jtab.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = ihead
INSERT = 'X'
SAVEMODE_DIRECT = ' '
OWNER_SPECIFIED = ' '
LOCAL_CAT = ' '
IMPORTING
FUNCTION =
NEWHEADER =
TABLES
LINES = Jtab
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'COMMIT_TEXT'
EXPORTING
OBJECT = '*'
NAME = '*'
ID = '*'
LANGUAGE = '*'
SAVEMODE_DIRECT = ' '
KEEP = ' '
LOCAL_CAT = ' '
IMPORTING
COMMIT_COUNT =
TABLES
T_OBJECT =
T_NAME =
T_ID =
T_LANGUAGE =
ENDFORM.
*&spwizard: declaration of tablecontrol 'TBLECTL' itself
controls: TBLECTL type tableview using screen 0100.
*&spwizard: lines of tablecontrol 'TBLECTL'
data: g_TBLECTL_lines like sy-loopc.
data: OK_CODE like sy-ucomm.
*&spwizard: output module for tc 'TBLECTL'. do not change this line!
*&spwizard: update lines for equivalent scrollbar
module TBLECTL_change_tc_attr output.
describe table ITAB lines TBLECTL-lines.
endmodule.
*&spwizard: output module for tc 'TBLECTL'. do not change this line!
*&spwizard: get lines of tablecontrol
module TBLECTL_get_lines output.
g_TBLECTL_lines = sy-loopc.
endmodule.
*&spwizard: input module for tc 'TBLECTL'. do not change this line!
*&spwizard: process user command
module TBLECTL_user_command input.
OK_CODE = sy-ucomm.
perform user_ok_tc using 'TBLECTL'
'ITAB'
changing OK_CODE.
sy-ucomm = OK_CODE.
endmodule.
INCLUDE TABLECONTROL_FORMS *
*& Form USER_OK_TC *
FORM USER_OK_TC USING P_TC_NAME TYPE DYNFNAM
P_TABLE_NAME
P_MARK_NAME
CHANGING P_OK LIKE SY-UCOMM.
&SPWIZARD: BEGIN OF LOCAL DATA----
DATA: L_OK TYPE SY-UCOMM,
L_OFFSET TYPE I.
&SPWIZARD: END OF LOCAL DATA----
*&SPWIZARD: Table control specific operations *
*&SPWIZARD: evaluate TC name and operations *
SEARCH P_OK FOR P_TC_NAME.
IF SY-SUBRC 0.
EXIT.
ENDIF.
L_OFFSET = STRLEN( P_TC_NAME ) + 1.
L_OK = P_OK+L_OFFSET.
*&SPWIZARD: execute general and TC specific operations *
CASE L_OK.
WHEN 'INSR'. "insert row
PERFORM FCODE_INSERT_ROW USING P_TC_NAME
P_TABLE_NAME.
CLEAR P_OK.
WHEN 'DELE'. "delete row
PERFORM FCODE_DELETE_ROW USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME.
CLEAR P_OK.
WHEN 'P--' OR "top of list
'P-' OR "previous page
'P+' OR "next page
'P++'. "bottom of list
PERFORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
L_OK.
CLEAR P_OK.
WHEN 'L--'. "total left
PERFORM FCODE_TOTAL_LEFT USING P_TC_NAME.
WHEN 'L-'. "column left
PERFORM FCODE_COLUMN_LEFT USING P_TC_NAME.
WHEN 'R+'. "column right
PERFORM FCODE_COLUMN_RIGHT USING P_TC_NAME.
WHEN 'R++'. "total right
PERFORM FCODE_TOTAL_RIGHT USING P_TC_NAME.
WHEN 'MARK'. "mark all filled lines
PERFORM FCODE_TC_MARK_LINES USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME .
CLEAR P_OK.
WHEN 'DMRK'. "demark all filled lines
PERFORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME .
CLEAR P_OK.
WHEN 'SASCEND' OR
'SDESCEND'. "sort column
PERFORM FCODE_SORT_TC USING P_TC_NAME
l_ok.
ENDCASE.
ENDFORM. " USER_OK_TC
*& Form FCODE_INSERT_ROW *
FORM fcode_insert_row
USING P_TC_NAME TYPE DYNFNAM
P_TABLE_NAME .
&SPWIZARD: BEGIN OF LOCAL DATA----
DATA L_LINES_NAME LIKE FELD-NAME.
DATA L_SELLINE LIKE SY-STEPL.
DATA L_LASTLINE TYPE I.
DATA L_LINE TYPE I.
DATA L_TABLE_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE CXTAB_CONTROL.
FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
FIELD-SYMBOLS <LINES> TYPE I.
&SPWIZARD: END OF LOCAL DATA----
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
*&SPWIZARD: get looplines of TableControl *
CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_LINES_NAME.
ASSIGN (L_LINES_NAME) TO <LINES>.
*&SPWIZARD: get current line *
GET CURSOR LINE L_SELLINE.
if sy-subrc 0. " append line to table
l_selline = <tc>-lines + 1.
*&SPWIZARD: set top line *
if l_selline > <lines>.
<tc>-top_line = l_selline - <lines> + 1 .
else.
<tc>-top_line = 1.
endif.
else. " insert line into table
l_selline = <tc>-top_line + l_selline - 1.
l_lastline = <tc>-top_line + <lines> - 1.
endif.
*&SPWIZARD: set new cursor line *
l_line = l_selline - <tc>-top_line + 1.
*&SPWIZARD: insert initial line *
INSERT INITIAL LINE INTO <TABLE> INDEX L_SELLINE.
<TC>-LINES = <TC>-LINES + 1.
*&SPWIZARD: set cursor *
SET CURSOR LINE L_LINE.
ENDFORM. " FCODE_INSERT_ROW
*& Form FCODE_DELETE_ROW *
FORM fcode_delete_row
USING P_TC_NAME TYPE DYNFNAM
P_TABLE_NAME
P_MARK_NAME .
&SPWIZARD: BEGIN OF LOCAL DATA----
DATA L_TABLE_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE cxtab_control.
FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
FIELD-SYMBOLS <WA>.
FIELD-SYMBOLS <MARK_FIELD>.
&SPWIZARD: END OF LOCAL DATA----
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
*&SPWIZARD: delete marked lines *
DESCRIBE TABLE <TABLE> LINES <TC>-LINES.
LOOP AT <TABLE> ASSIGNING <WA>.
*&SPWIZARD: access to the component 'FLAG' of the table header *
ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
IF <MARK_FIELD> = 'X'.
DELETE <TABLE> INDEX SYST-TABIX.
IF SY-SUBRC = 0.
<TC>-LINES = <TC>-LINES - 1.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " FCODE_DELETE_ROW
*& Form COMPUTE_SCROLLING_IN_TC
text
-->P_TC_NAME name of tablecontrol
-->P_OK ok code
FORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
P_OK.
&SPWIZARD: BEGIN OF LOCAL DATA----
DATA L_TC_NEW_TOP_LINE TYPE I.
DATA L_TC_NAME LIKE FELD-NAME.
DATA L_TC_LINES_NAME LIKE FELD-NAME.
DATA L_TC_FIELD_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE cxtab_control.
FIELD-SYMBOLS <LINES> TYPE I.
&SPWIZARD: END OF LOCAL DATA----
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get looplines of TableControl *
CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_TC_LINES_NAME.
ASSIGN (L_TC_LINES_NAME) TO <LINES>.
*&SPWIZARD: is no line filled? *
IF <TC>-LINES = 0.
*&SPWIZARD: yes, ... *
L_TC_NEW_TOP_LINE = 1.
ELSE.
*&SPWIZARD: no, ... *
CALL FUNCTION 'SCROLLING_IN_TABLE'
EXPORTING
ENTRY_ACT = <TC>-TOP_LINE
ENTRY_FROM = 1
ENTRY_TO = <TC>-LINES
LAST_PAGE_FULL = 'X'
LOOPS = <LINES>
OK_CODE = P_OK
OVERLAPPING = 'X'
IMPORTING
ENTRY_NEW = L_TC_NEW_TOP_LINE
EXCEPTIONS
NO_ENTRY_OR_PAGE_ACT = 01
NO_ENTRY_TO = 02
NO_OK_CODE_OR_PAGE_GO = 03
OTHERS = 0.
ENDIF.
*&SPWIZARD: get actual tc and column *
GET CURSOR FIELD L_TC_FIELD_NAME
AREA L_TC_NAME.
IF SYST-SUBRC = 0.
IF L_TC_NAME = P_TC_NAME.
*&SPWIZARD: et actual column *
SET CURSOR FIELD L_TC_FIELD_NAME LINE 1.
ENDIF.
ENDIF.
*&SPWIZARD: set the new top line *
<TC>-TOP_LINE = L_TC_NEW_TOP_LINE.
ENDFORM. " COMPUTE_SCROLLING_IN_TC
*& Form FCODE_TC_MARK_LINES
marks all TableControl lines
-->P_TC_NAME name of tablecontrol
FORM FCODE_TC_MARK_LINES USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME.
&SPWIZARD: EGIN OF LOCAL DATA----
DATA L_TABLE_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE cxtab_control.
FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
FIELD-SYMBOLS <WA>.
FIELD-SYMBOLS <MARK_FIELD>.
&SPWIZARD: END OF LOCAL DATA----
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
*&SPWIZARD: mark all filled lines *
LOOP AT <TABLE> ASSIGNING <WA>.
*&SPWIZARD: access to the component 'FLAG' of the table header *
ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
<MARK_FIELD> = 'X'.
ENDLOOP.
ENDFORM. "fcode_tc_mark_lines
*& Form FCODE_TC_DEMARK_LINES
demarks all TableControl lines
-->P_TC_NAME name of tablecontrol
FORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME .
&SPWIZARD: BEGIN OF LOCAL DATA----
DATA L_TABLE_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE cxtab_control.
FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
FIELD-SYMBOLS <WA>.
FIELD-SYMBOLS <MARK_FIELD>.
&SPWIZARD: END OF LOCAL DATA----
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
*&SPWIZARD: demark all filled lines *
LOOP AT <TABLE> ASSIGNING <WA>.
*&SPWIZARD: access to the component 'FLAG' of the table header *
ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
<MARK_FIELD> = SPACE.
ENDLOOP.
ENDFORM. "fcode_tc_mark_lines
Source : https://forums.sdn.sap.com/click.jspa?searchID=15092700&messageID=5654151
Have A Good Day
Chaitanya.

Similar Messages

  • How to save Custom control records through module pool program ?

    Hi guru ,
    1. How to save Custom control records through module pool program ?
    I wrote multiple lines of record in custom control
    Who to save that records ?
    thanking you.
    Regards,
    Subash.

    Hi,
    can refer following code -
    IN PAI , CODE is as follows-
    *&      Form  editor_output
    FORM editor_output .
    NARRATION1 is name of custom controller
      IF v_editor IS INITIAL.
      Create obejct for custom container
        CREATE OBJECT v_custom_container
          EXPORTING
            container_name              = 'NARRATION1'
          EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            OTHERS                      = 6.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      Create obejct for the TextEditor control
        CREATE OBJECT v_editor
          EXPORTING
            wordwrap_mode              = cl_gui_textedit=>wordwrap_at_fixed_position
            wordwrap_position          = line_length
            wordwrap_to_linebreak_mode = cl_gui_textedit=>true
            parent                     = v_custom_container
          EXCEPTIONS
            error_cntl_create          = 1
            error_cntl_init            = 2
            error_cntl_link            = 3
            error_dp_create            = 4
            gui_type_not_supported     = 5
            OTHERS                     = 6.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDIF.
    ENDFORM.                    " editor_output
    getting textdata in internal table as follows
    *&      Form  create_text
    FORM create_text .
      REFRESH : it_texttable,
                it_text.
      IF v_doc_number IS NOT INITIAL.
        IF v_editor IS NOT INITIAL.
          CALL METHOD v_editor->get_text_as_r3table
            IMPORTING
              table                  = it_texttable
            EXCEPTIONS
              error_dp               = 1
              error_cntl_call_method = 2
              error_dp_create        = 3
              potential_data_loss    = 4
              OTHERS                 = 5.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                       WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
    Now, our final text data is in internal table it_texttable.
    pls, Reward if found helpful.

  • F4 help for the Date field in Module-Pool program

    Hi,
    I have a requirement wherein the user shud be allowed to choose a date on the calendar using F4 help and after choosing, it shud get displayed as dd.mm.yyyy format in the field. Is there any functional module to implement this.
    Thanks in Advance,
    Saranya.

    Hi,
    Please try the below code in your prgm.
    You have to write the below code in the POV of the required field.
    ***INCLUDE MZDATE_POV_DATEI01 .
    *&      Module  pov_date  INPUT
          text
    module pov_date input.
    DATA: li_ret_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname = ' '
    fieldname = ' '
    searchhelp = 'BU_DATE_CHAR'
    TABLES
    return_tab = li_ret_tab
    EXCEPTIONS
    field_not_found = 1
    no_help_for_field = 2
    inconsistent_help = 3
    no_values_found = 4
    OTHERS = 5.
    IF sy-subrc IS INITIAL.
    READ TABLE li_ret_tab INDEX 1.
    IF sy-subrc IS INITIAL.
    wrk_date = li_ret_tab-fieldval. "The required field
    ENDIF.
    ENDIF.
    endmodule.                 " pov_date  INPUT
    Hope it suits ur requirement.
    Reward points if useful.
    Thanks and regards,
    Litta.

  • How to insert data into a  Ztable by using module pool programming??

    Hi,
    I am new to ABAP, Actually I have made a Ztable now I want to insert data by using the module pool programming. In which there are all field in the first screen and there is a save button. So when ever i press SAVE button it shud update the Ztable with new entries.But actually I am not getting How can i update that??can you please send me the code for inserting data.
    Thanks in Advance.
    Edited by: Swapna Ram on Feb 17, 2008 12:01 AM

    Swapna,
    Check this thread...
    Custom Table updation thru table control
    ALso check this..
    Dialog programming

  • Using logical database to fetch data in Module Pool programming

    I am unable to use logical database to fetch data in case of Module pool programming. Has anyone ever faced problems with it...?

    use f.m LDB_PROCESS....
    refer demo program DEMO_LOGICAL_DATABASE

  • Cursor position on screen data in module pool programming(urgent)

    Hi all,
    I developed a module pool  program which will save the data after  scanning the barcode data.
    In my program screen 100 is there which contains field  ‘2dbar’. scanned data is comming to 2dbar field.
    we r doing scan 4 times.once for vendor number,once for material no. like this.
    After 1st scan, vendor number will come to field ‘2dbar’.
    Then I developed logic to put comma after each scanned data come to this field ‘2dbar’.
    MODULE put_comma INPUT.
    CASE OK_CODE.
    when ''.
    move 2dbar to 2dbar1.
    clear 2dbar.
    concatenate 2dbar1 ',' into 2dbar2.
    *replace 2dbar with 2dbar2 into 2dbar.
    move 2dbar2 to 2dbar.
    *write 2dbar2 to 2dbar.
    condense 2dbar no-gaps.
    *move '' to 2dbar.
    *set cursor field 2dbar offset 5.
    *write
    ENDCASE.
    ENDMODULE.                 " put_comma  INPUT
    By above logic, comma  comes to the starting position of 2dbar after each scan. i.e cursor position is coming to the starting position of screen field ‘2dbar’.
    Now  I need to move the cursor position after the comma position on 2dbar after each scan.
    after 1st scan, 2dbar contains
    vmotorola
    then my logic puts a comma when u put enter on screen 100.
    now 2dbar contains
    vmotorola,
    i should get the cursor position after the comma.but i am getting cursor position before 'v'.so how to move this cursor position  beyond comma after each scan.
    I added set cursor  command but it is not working.plz
    What is the logic, I need to put in PAI  to move the cursor on selection screen.
    Already the logic I have mentioned.  with that logic, I can put comma.now I need to add cursor movement logic  to move the cursoron  on screen field ‘2dbar’.
    Plz reply me as it is urgent.
    Thanks in advance.
    Regards
    pabitra

    CASE OK_CODE.
    when ''.
    move 2dbar to 2dbar1.
    clear 2dbar.
    concatenate 2dbar1 ',' into 2dbar2.
    move 2dbar2 to 2dbar.
    condense 2dbar no-gaps.
    len = strlen ( 2dbar ).
    len = len - 1.
    set cursor field 2dbar offset len.
    ENDCASE.
    ENDMODULE. " put_comma INPUT

  • Data type selection Problem in ztable to use in the Module Pool Program

    Dear Experts,
    I have created a z-table which is used in Module Pool Program in which i have to save the information saved by the endusers in z-table. But the problem comming is that the amount of information saved by the endusers is so havey & our table is just limited for the 50 characters which is not sufficiet. So I urge you to please tell me what & which type of data type should I have to use to store maximum amount of information in our zt-able which is available in SAP ECC6.0.
    Thanks & Regards,
    Akg

    Dear Akg,
    u can resolve ur problem in following ways,
    1. You can declare the field in a table without an Data element.
          i.e. In the length field . using F4 help in length field how many characters u want u enter.
    2. In the same u can search for an standard data element and use the same.
    3. Creating an custom data element .
    Reward if helps to u!!!
    Regards,
    MNR

  • How to insert Logo in module pool programming

    Plz any one can explain me that  how we will inseart Logo on screens by using module pool programming (in GUI programming) .

    Hello.
    I'll give you an example of inserting a personal photo in UI programming. Hope it helps you.
    First of all, in your screen (painter), insert a custom control and give it a name (PHOTO in my example).
    Then, in your screen PBO, insert a coding like this:
    CLEAR handle.
    CALL FUNCTION 'HR_IMAGE_INIT'
        EXPORTING
          p_pernr        = pernr
          p_tclas        = 'A'
          container      = 'PHOTO'
        IMPORTING
          handle         = handle
        EXCEPTIONS
          no_document    = 1
          internal_error = 2
          OTHERS         = 3.
      CALL FUNCTION 'HR_IMAGE_SHOW'
        EXPORTING
          p_pernr        = pernr
          p_tclas        = 'A'
          handle         = handle
        EXCEPTIONS
          invalid_handle = 1
          no_document    = 2
          internal_error = 3
          OTHERS         = 4.
    Regards.
    Valter Oliveira.

  • How to extract the data from module pool program to Excel Sheet?

    Hi Guys
            I am having a requirement to transfer the data from Module pool screen to excel sheet directly.
            This is an urgent requirement.
            So plz reply me with some coding examples.
            I will give points for that.

    This report extract excel file. From that concept you can easily extract data from module pool program also by coding in PAI of the screen.
    REPORT ztest1 .
    * this report demonstrates how to send some ABAP data to an
    * EXCEL sheet using OLE automation.
    include ole2incl.
    * handles for OLE objects
    data: h_excel type ole2_object,        " Excel object
          h_mapl type ole2_object,         " list of workbooks
          h_map type ole2_object,          " workbook
          h_zl type ole2_object,           " cell
          h_f type ole2_object,            " font
          h_c type ole2_object.            " color
    DATA: FILENAME LIKE RLGRAP-FILENAME.
    tables: spfli.
    data  h type i.
    * table of flights
    data: it_spfli like spfli occurs 10 with header line.
    *&   Event START-OF-SELECTION
    start-of-selection.
    * read flights
      select * from spfli into table it_spfli.
    * display header
      uline (61).
      write: /     sy-vline no-gap,
              (3)  'Flg'(001) color col_heading no-gap, sy-vline no-gap,
              (4)  'Nr'(002) color col_heading no-gap, sy-vline no-gap,
              (20) 'Von'(003) color col_heading no-gap, sy-vline no-gap,
              (20) 'Nach'(004) color col_heading no-gap, sy-vline no-gap,
              (8)  'Zeit'(005) color col_heading no-gap, sy-vline no-gap.
      uline /(61).
    * display flights
      loop at it_spfli.
        write: / sy-vline no-gap,
                 it_spfli-carrid color col_key no-gap, sy-vline no-gap,
                 it_spfli-connid color col_normal no-gap, sy-vline no-gap,
                 it_spfli-cityfrom color col_normal no-gap, sy-vline no-gap,
                 it_spfli-cityto color col_normal no-gap, sy-vline no-gap,
                 it_spfli-deptime color col_normal no-gap, sy-vline no-gap.
      endloop.
      uline /(61).
    * tell user what is going on
      call function 'SAPGUI_PROGRESS_INDICATOR'
         exporting
    *           PERCENTAGE = 0
               text       = text-007
           exceptions
                others     = 1.
    * start Excel
      create object h_excel 'EXCEL.APPLICATION'.
    *  PERFORM ERR_HDL.
      set property of h_excel  'Visible' = 1.
    *  CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'c:kis_excel.xls'
    *  PERFORM ERR_HDL.
    * tell user what is going on
      call function 'SAPGUI_PROGRESS_INDICATOR'
         exporting
    *           PERCENTAGE = 0
               text       = text-008
           exceptions
                others     = 1.
    * get list of workbooks, initially empty
      call method of h_excel 'Workbooks' = h_mapl.
      perform err_hdl.
    * add a new workbook
      call method of h_mapl 'Add' = h_map.
      perform err_hdl.
    * tell user what is going on
      call function 'SAPGUI_PROGRESS_INDICATOR'
         exporting
    *           PERCENTAGE = 0
               text       = text-009
           exceptions
                others     = 1.
    * output column headings to active Excel sheet
      perform fill_cell using 1 1 1 200 'Carrier id'(001).
      perform fill_cell using 1 2 1 200 'Connection id'(002).
      perform fill_cell using 1 3 1 200 'City from'(003).
      perform fill_cell using 1 4 1 200 'City to'(004).
      perform fill_cell using 1 5 1 200 'Dep. Time'(005).
      loop at it_spfli.
    * copy flights to active EXCEL sheet
        h = sy-tabix + 1.
        if it_spfli-carrid cs 'AA'.
          perform fill_cell using h 1 0 000255000 it_spfli-carrid.
        elseif it_spfli-carrid cs 'AZ'.
          perform fill_cell using h 1 0 168000000 it_spfli-carrid.
        elseif it_spfli-carrid cs 'JL'.
          perform fill_cell using h 1 0 168168000 it_spfli-carrid.
        elseif it_spfli-carrid cs 'LH'.
          perform fill_cell using h 1 0 111111111 it_spfli-carrid.
        elseif it_spfli-carrid cs 'SQ'.
          perform fill_cell using h 1 0 100100100 it_spfli-carrid.
        else.
          perform fill_cell using h 1 0 000145000 it_spfli-carrid.
        endif.
        if it_spfli-connid lt 400.
          perform fill_cell using h 2 0 255000255 it_spfli-connid.
        elseif it_spfli-connid lt 800.
          perform fill_cell using h 2 0 077099088 it_spfli-connid.
        else.
          perform fill_cell using h 2 0 246156138 it_spfli-connid.
        endif.
        if it_spfli-cityfrom cp 'S*'.
          perform fill_cell using h 3 0 155155155 it_spfli-cityfrom.
        elseif it_spfli-cityfrom cp 'N*'.
          perform fill_cell using h 3 0 189111222 it_spfli-cityfrom.
        else.
          perform fill_cell using h 3 0 111230222 it_spfli-cityfrom.
        endif.
        if it_spfli-cityto cp 'S*'.
          perform fill_cell using h 4 0 200200200 it_spfli-cityto.
        elseif it_spfli-cityto cp 'N*'.
          perform fill_cell using h 4 0 000111222 it_spfli-cityto.
        else.
          perform fill_cell using h 4 0 130230230 it_spfli-cityto.
        endif.
        if it_spfli-deptime lt '020000'.
          perform fill_cell using h 5 0 145145145 it_spfli-deptime.
        elseif it_spfli-deptime lt '120000' .
          perform fill_cell using h 5 0 015215205 it_spfli-deptime.
        elseif it_spfli-deptime lt '180000' .
          perform fill_cell using h 5 0 000215205 it_spfli-deptime.
        else.
          perform fill_cell using h 5 0 115115105 it_spfli-deptime.
        endif.
      endloop.
    * EXCEL FILENAME
      CONCATENATE SY-REPID '_' SY-DATUM+6(2) '_' SY-DATUM+4(2) '_'
                  SY-DATUM(4) '_' SY-UZEIT '.XLS' INTO FILENAME.
      CALL METHOD OF H_MAP 'SAVEAS' EXPORTING #1 = FILENAME.
      free object h_excel.
      perform err_hdl.
    *       FORM FILL_CELL                                                *
    *       sets cell at coordinates i,j to value val boldtype bold       *
    form fill_cell using i j bold col val.
      call method of h_excel 'Cells' = h_zl
        exporting
          #1 = i
          #2 = j.
      perform err_hdl.
      set property of h_zl 'Value' = val .
      perform err_hdl.
      get property of h_zl 'Font' = h_f.
      perform err_hdl.
      set property of h_f 'Bold' = bold .
      perform err_hdl.
      set property of h_f 'Color' = col.
      perform err_hdl.
    endform.                    "FILL_CELL
    *&      Form  ERR_HDL
    *       outputs OLE error if any                                       *
    *  -->  p1        text
    *  <--  p2        text
    form err_hdl.
      if sy-subrc <> 0.
        write: / 'OLE-Automation Error:'(010), sy-subrc.
        stop.
      endif.
    endform.                    " ERR_HDL

  • Table controlls in module pool programming

    Hi all.
    I have an issue in module pool program.
    I created a table controll in the screen through table controll wizard.
    In that if I enter the data for 10 records(more than 1),then I(pressed)clicked on ENTER . then only first record is staying in the table controll.all other recods are
    going(disappering) from the table controll.
    Can any body help me to solve this problem.
    Thanks in Advance,
    Regards.
    Eswar

    you are not storing the entries given in the table control.
    i can give you an idea.
    declare an internal table which has the same structure as of the table control.
    in the PAI event, refresh the internal talbe.
    loop at the table control. move all the entries of the table control to the internal table.
    in the PBO event, refresh the table control. count the number of lines in table control. insert all the lines of internal table to the table control one after another.
    hope this helps you.
    thanks
    pavan

  • Simple Module Pool Program

    Hello all,
    can any one give one simple program for                Insert Update Delete
    i have taken 9 fields and in a simple screen.
    and have 3 button. through this i want to Insert Update and Delete Data in customize table.
    Thaks.
    Rajesh.

    * MODULE POOL                                                          *
    PROGRAM  YP_BOOKMASTER_MAINTENANCE  MESSAGE-ID ZZ.
    *                       TABLES                                         *
    TABLES ZBKMA.                                         "book master table
    *                      VARIABLES                                       *
    DATA : V_NUMBER(5) TYPE N,            "variable to store random number
           V_LINE TYPE I,                 "variable to get total no of lines
           V_FLAG LIKE SY-TABIX.          "variable for checking
    *                     INTERNAL TABLE                                   *
    * internal table to store book numbers (i.e random numbers)
    DATA : BEGIN OF IT_RANDOMNUMBERS OCCURS 0,
           BKNUM LIKE ZBKMA-BKNUM,                   "book number
           END OF IT_RANDOMNUMBERS.
    * internal table to store only numeric part of book number
    * eg : if book no is HUM00100 ,this table will only store 00100
    DATA : BEGIN OF IT_NUMBERS OCCURS 0,
           NUMBER(5) TYPE N,                          " a number
           END OF IT_NUMBERS.
    *internal table to store book details
    DATA : BEGIN OF IT_BOOKMASTER OCCURS 0,
           BKNUM LIKE ZBKMA-BKNUM,            "BOOK NUMBER
           BKNAM LIKE ZBKMA-BKNAM,            "BOOK NAME
           AUTHR LIKE ZBKMA-AUTHR,            "AUTHOR
           SRCHT LIKE ZBKMA-SRCHT,            "SEARCH TERM
           PUBSH LIKE ZBKMA-PUBSH,            "PUBLISHER
           YRPUB LIKE ZBKMA-YRPUB,            "YEAR OF PUBLISHING
           VERNO LIKE ZBKMA-VERNO,            "VERSION NUMBER
           DATPR LIKE ZBKMA-DATPR,            "DATE OF PURCHASE
           BKCOD LIKE ZBKMA-BKCOD,            "BOOKCODE
           END OF IT_BOOKMASTER .
    *& Module  STATUS_0090  OUTPUT
    *  PBO OF SCREEN 090(screen contains three buttons ADD , DELETE , MODIFY)
    MODULE STATUS_0090 OUTPUT.
      SET PF-STATUS 'BOOKMASTER_FIRST'.
      SET TITLEBAR 'BOOKMASTER'.
    ENDMODULE.                 " STATUS_0090  OUTPUT
    *&      Module  USER_COMMAND_0090  INPUT
    *      PAI OF SCREEN 90
    MODULE USER_COMMAND_0090 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          LEAVE TO SCREEN '0'.            "go back
        WHEN 'EXIT'.
          LEAVE PROGRAM.                  "exit the program
        WHEN 'CANCEL'.
          leave to screen '0'.             "cancel the screen
        WHEN 'ADD'.
          CLEAR IT_BOOKMASTER.             "clears the contents of the fields.
          CALL SCREEN '0100'.
        WHEN 'DELETE'.
          CLEAR IT_BOOKMASTER.             "clears the contents of the fields.
          CALL SCREEN '0200'.
        WHEN 'MODIFY'.
          CLEAR IT_BOOKMASTER.             "clears the contents of the fields.
          CALL SCREEN '0300'.
      ENDCASE.        "end sy-ucomm
    ENDMODULE.                 " USER_COMMAND_0090  INPUT
    *&      Module  STATUS_0100  OUTPUT
    *       PBO OF 100 ( ADD THE BOOKS )
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'BOOKMASTER'.
      SET TITLEBAR 'UPDATE BOOKMASTER'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *         PAI OF 100 ( ADD THE BOOKS )
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.            "check the screen 100 actions
        WHEN 'BACK'.
          LEAVE TO SCREEN '0'.      "go back
        WHEN 'EXIT'.
          LEAVE PROGRAM.            "exit the program
        WHEN 'CANCEL'.
          LEAVE to screen '0' .      "cancel the screen 100
        WHEN 'ADD'.
    *      add the books to the master records
          PERFORM FORM_ADDBOOK.      " add the
        WHEN 'RESET'.
          CLEAR IT_BOOKMASTER.        "reset the screen
          SET SCREEN '0100'.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  FORM_ADDBOOK
    *       ADDING THE BOOKS
    FORM FORM_ADDBOOK .
    *TO ASSIGN BOOK NUMBER
      PERFORM FORM_ASSIGN_BOOKNO.
    * INSERTING THE BOOKS
      ZBKMA-BKNAM = IT_BOOKMASTER-BKNAM.
      ZBKMA-AUTHR = IT_BOOKMASTER-AUTHR.
      ZBKMA-SRCHT = IT_BOOKMASTER-SRCHT.
      ZBKMA-PUBSH = IT_BOOKMASTER-PUBSH.
      ZBKMA-YRPUB = IT_BOOKMASTER-YRPUB.
      ZBKMA-VERNO = IT_BOOKMASTER-VERNO.
      ZBKMA-DATPR = IT_BOOKMASTER-DATPR.
      ZBKMA-BKCOD = IT_BOOKMASTER-BKCOD.
    IF NOT IT_BOOKMASTER-BKNAM IS INITIAL.  "if the book number is not initial
      INSERT ZBKMA.
    ENDIF.   "endif check initial
      IF SY-SUBRC = 0.
        MESSAGE S003(ZCHA) WITH IT_BOOKMASTER-BKNUM.
      ENDIF.    "endif success
    ENDFORM.                    " FORM_ADDBOOK
    *&      Form  FORM_DELETEBOOK
    *       delete books from the master data
    *  -->  p1        text
    *  <--  p2        text
    FORM FORM_DELETEBOOK .
    * check the it is initial
      IF NOT IT_BOOKMASTER-BKNUM IS INITIAL.
    *get the book numbers present already
        SELECT SINGLE BKNUM
               FROM ZBKMA
               INTO ZBKMA-BKNUM
               WHERE BKNUM = IT_BOOKMASTER-BKNUM.
    *check if select is successful
        IF SY-SUBRC = 0.
          DELETE FROM ZBKMA WHERE BKNUM = IT_BOOKMASTER-BKNUM.
          MESSAGE S004(ZCHA) WITH IT_BOOKMASTER-BKNUM.      "if book deleted
        ELSE.
          MESSAGE S005(ZCHA) WITH IT_BOOKMASTER-BKNUM.      "if book not found
        ENDIF.
      ENDIF.
    ENDFORM.                    " FORM_DELETEBOOK
    *&      Form  FORM_MODIFYBOOK
    *       MODIFING THE BOOK
    FORM FORM_MODIFYBOOK.
    *validiate the book number
      SELECT SINGLE BKNUM
                FROM ZBKMA
                INTO ZBKMA-BKNUM
                WHERE BKNUM = IT_BOOKMASTER-BKNUM.
    *check for the success
      IF SY-SUBRC NE 0.
        MESSAGE S005(ZCHA) WITH IT_BOOKMASTER-BKNUM.
      ENDIF.
      ZBKMA-BKNUM = IT_BOOKMASTER-BKNUM.
      ZBKMA-BKNAM = IT_BOOKMASTER-BKNAM.
      ZBKMA-AUTHR = IT_BOOKMASTER-AUTHR.
      ZBKMA-SRCHT = IT_BOOKMASTER-SRCHT.
      ZBKMA-PUBSH = IT_BOOKMASTER-PUBSH.
      ZBKMA-YRPUB = IT_BOOKMASTER-YRPUB.
      ZBKMA-VERNO = IT_BOOKMASTER-VERNO.
      ZBKMA-DATPR = IT_BOOKMASTER-DATPR.
      UPDATE ZBKMA.      "update the book master table
      IF SY-SUBRC = 0.
        MESSAGE S006(ZCHA) WITH IT_BOOKMASTER-BKNUM.
      ENDIF.
    ENDFORM.                    " FORM_MODIFYBOOK
    *&      Form  FORM_ASSIGN_BOOKNO
    *       TEXT
    FORM FORM_ASSIGN_BOOKNO .
    *select the books already there from bookmaster
      SELECT BKNUM
             FROM ZBKMA
             INTO TABLE IT_RANDOMNUMBERS
             WHERE BKCOD = IT_BOOKMASTER-BKCOD.
    *if the book is first book i.e. first entry
      IF IT_RANDOMNUMBERS[] IS INITIAL.
        V_NUMBER = 1.                          "start with 1
        CONCATENATE IT_BOOKMASTER-BKCOD  V_NUMBER INTO IT_BOOKMASTER-BKNUM.
        ZBKMA-BKNUM = IT_BOOKMASTER-BKNUM.      "assign booknumber
        EXIT.
      ENDIF.        "check for initial
      CLEAR IT_NUMBERS[].        "clear the temporary table
      CLEAR IT_NUMBERS.
    * check for the book numbers if there is no book start from first in other
    * cases look for first gap and assign that number
      LOOP AT IT_RANDOMNUMBERS.
        IT_NUMBERS-NUMBER   = IT_RANDOMNUMBERS-BKNUM+3(5). "get the last 5 digits
                                                            "and store it in it_number
        APPEND IT_NUMBERS.
      ENDLOOP.
      SORT IT_NUMBERS BY NUMBER.          "sort
      DESCRIBE TABLE IT_NUMBERS LINES V_LINE.    "get no. of lines in table
    *check for book number gap
      LOOP AT IT_NUMBERS.
        V_FLAG = SY-TABIX.
    * if the book number is not equal to the index of table i.e. some gap in book number
    * or only one record
        IF IT_NUMBERS-NUMBER NE SY-TABIX OR V_LINE = 1.
           V_NUMBER = SY-TABIX.          "fill the gap
            if v_line = 1.                "if only one record
                  v_number = v_line + 1.   "increment the book number
            endif.          "only one record check
              CONCATENATE IT_BOOKMASTER-BKCOD  V_NUMBER INTO IT_BOOKMASTER-BKNUM.
              ZBKMA-BKNUM = IT_BOOKMASTER-BKNUM.      "assign
              EXIT.
       ENDIF.      "check for gap
    *if no gap in book number assign next number
                  IF V_FLAG = V_LINE.
                         V_NUMBER = IT_NUMBERS-NUMBER + 1.
                         CONCATENATE IT_BOOKMASTER-BKCOD  V_NUMBER INTO IT_BOOKMASTER-BKNUM.
                        ZBKMA-BKNUM = IT_BOOKMASTER-BKNUM.
                        EXIT.
                  ENDIF.      "book number increment
      ENDLOOP.        "check number gap
    ENDFORM.                    " FORM_ASSIGN_BOOKNO
    *&      Module  STATUS_0200  OUTPUT
    *       PBO OF SCREEN 200 ( DELETE BOOKS)
    MODULE STATUS_0200 OUTPUT.
      SET PF-STATUS 'DELETE'.
      SET TITLEBAR 'DELETE'.
    ENDMODULE.                 " STATUS_0200  OUTPUT
    *&      Module  USER_COMMAND_0200  INPUT
    *       PAI OF SCREEN 200 (DELETE BOOKS)
    MODULE USER_COMMAND_0200 INPUT.
      CASE SY-UCOMM.        "check for screen 200 actions
        WHEN 'BACK'.
          LEAVE TO SCREEN '0'.        "go back
        WHEN 'EXIT'.
          LEAVE PROGRAM.              "leave program
        WHEN 'CANCEL'.
          LEAVE to screen '0'.        "cancel screen
        WHEN 'DELETE'.
    * delete the book from master data
          PERFORM FORM_DELETEBOOK.
        WHEN 'RESET'.                  "reset the screen
          CLEAR IT_BOOKMASTER.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0200  INPUT
    *&      Module  STATUS_0300  OUTPUT
    *       PBO OF SCREEN 300 ( FOR MODIFYING )
    MODULE STATUS_0300 OUTPUT.
      SET PF-STATUS 'MODIFY'.
      SET TITLEBAR 'MODIFY'.
    ENDMODULE.                 " STATUS_0300  OUTPUT
    *&      Module  USER_COMMAND_0300  INPUT
    *       text
    MODULE USER_COMMAND_0300 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          LEAVE TO SCREEN '0'.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'CANCEL'.
          LEAVE TO SCREEN '0'.
        WHEN 'MODIFY'.
          PERFORM FORM_MODIFYBOOK.        "update the record
        WHEN 'RESET'.
          CLEAR IT_BOOKMASTER.            "screen reset
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0300  INPUT
    *&      Module  MODULE_CANCEL  INPUT
    *       ACTIONS AT EXIT COMMAND
    MODULE MODULE_CANCEL INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          LEAVE TO SCREEN '0'.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'CANCEL'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " MODULE_CANCEL  INPUT
    Message was edited by: Chandrasekhar Jagarlamudi

  • How to call a "Z"module pool program in a "z"report

    Hi Guys,
    I have two reports .
    1. Report : uploads a tab delimited " .Txt1" file and update the "z1" table
        ".TXT1" : File contains 4 fields
    2. Module pool. :Uploads a a tab delimited " .Txt2" file and update another "z2" table
        ".TXT2" file contains  the 4 fileds of ".TXT1" and also 2 extra fields.
    I want to merge (call) the module pool program in the Report and perform the upload function using only one ".TXT" file.Please do guide me precisely .
    *Report:*
    REPORT zrswbgcs009 NO STANDARD PAGE HEADING MESSAGE-ID zwb
                         LINE-SIZE 185.
    TABLES:  zgcs_foc.      "FOC Parts Table
    *data count buffer
    DATA:    read_cnt(6)    TYPE p,        "Find read record
             update_cnt(6)  TYPE p,        "OK record
             error_cnt(6)   TYPE p.        "Error record
    *file buffer(FOC)
    DATA: BEGIN OF FOC_inrec  OCCURS  0,
            CUSTOMER(10),      "Customer
            PART_CODE(18),     "Parts Code
            REF_NO(35),        "Ref No.
            REF_DATE(10),      "Ref Date
            QTY(12),           "Parts Qty
            TEXT(100),         "Remark
          END OF FOC_inrec.
    *file buffer
    DATA: BEGIN OF inrec  OCCURS  0,
            CUSTOMER(10),      "Customer
            PART_CODE(18),     "Parts Code
            REF_NO(35),        "Ref No.
            REF_DATE(10),      "Ref Date
            QTY(12),           "Parts Qty
            PRICE(15),         "Parts Price
            WAERK(5),          "Parts Currency
            TEXT(100),         "Remark
          END OF inrec.
    DATA : v_file      LIKE rlgrap-filename.
    DATA gt_zgcs_foc LIKE zgcs_foc OCCURS 0 WITH HEADER LINE.
    DATA gs_zgcs_foc LIKE zgcs_foc.
    *File name ACCEPT--------------------------------------------------
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN  BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    *Company code
    PARAMETERS:  p_comp LIKE zgcs_imei-company OBLIGATORY.
    PARAMETERS:  pcfile LIKE rlgrap-filename OBLIGATORY LOWER CASE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 1.
    PARAMETERS: HQfile  RADIOBUTTON GROUP b2.
    SELECTION-SCREEN COMMENT 7(20)  text-101 FOR FIELD HQfile.
    SELECTION-SCREEN POSITION 31.
    PARAMETERS: SUBfile RADIOBUTTON GROUP b2.
    SELECTION-SCREEN COMMENT 37(20) text-102 FOR FIELD SUBfile.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN  END   OF BLOCK b1.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF BLOCK box WITH FRAME.
    SELECTION-SCREEN: COMMENT /2(40) text-011, COMMENT  42(40) text-001,
                      ULINE,
                      COMMENT /2(40) text-012, COMMENT  42(40) text-002,
                      COMMENT /2(40) text-013, COMMENT  42(40) text-003,
                      COMMENT /2(40) text-014, COMMENT  42(40) text-004,
                      COMMENT /2(40) text-015, COMMENT  42(40) text-005,
                      COMMENT /2(40) text-016, COMMENT  42(40) text-006,
                      COMMENT /2(40) text-017, COMMENT  42(40) text-007,
                      COMMENT /2(40) text-018, COMMENT  42(40) text-008,
                                               COMMENT /42(40) text-009.
    SELECTION-SCREEN END OF BLOCK box.
    * -- AT SELECTION SCREEN ON
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pcfile.
      CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
                def_filename     = space
                def_path         = 'C:\'
                mask             = ',*.txt,*.TXT.'
                mode             = 'O'
                title            = ' '
           IMPORTING
                filename         = pcfile
           EXCEPTIONS
                inv_winsys       = 1
                no_batch         = 2
                selection_cancel = 3
                selection_error  = 4
                OTHERS           = 5.
    *-----------------------------start--------------------------------
    START-OF-SELECTION.
      CLEAR: read_cnt, update_cnt, error_cnt.
      REFRESH gt_zgcs_foc.        CLEAR gs_zgcs_foc.
      PERFORM file_upload_from_pc.
      SORT gt_zgcs_foc.
      DELETE ADJACENT DUPLICATES FROM gt_zgcs_foc
             COMPARING COMPANY CUSTOMER PART_CODE REF_NO REF_DATE.
    *// customer code check
      DATA: LT_ZESTD LIKE ZESTD OCCURS 0 WITH HEADER LINE.
      IF NOT gt_zgcs_foc[] IS INITIAL.
        SELECT COMPANY CUSTOMER CURRENCY
          INTO CORRESPONDING FIELDS OF TABLE LT_ZESTD
          FROM ZESTD
           FOR ALL ENTRIES IN gt_zgcs_foc
         WHERE COMPANY  = gt_zgcs_foc-COMPANY
           AND CUSTOMER = gt_zgcs_foc-CUSTOMER.
      ENDIF.
      SORT LT_ZESTD BY COMPANY CUSTOMER.
    *// part code check
      DATA: LT_MARA LIKE MARA OCCURS 0 WITH HEADER LINE.
      IF NOT gt_zgcs_foc[] IS INITIAL.
        SELECT *
          INTO TABLE LT_MARA
          FROM MARA
           FOR ALL ENTRIES IN gt_zgcs_foc
         WHERE MATNR = gt_zgcs_foc-PART_CODE.
      ENDIF.
      SORT LT_MARA BY MATNR.
      LOOP AT gt_zgcs_foc.
    *// customer code check
        READ TABLE LT_ZESTD WITH KEY
                COMPANY  = gt_zgcs_foc-COMPANY
                CUSTOMER = gt_zgcs_foc-CUSTOMER.
        IF SY-SUBRC <> 0.
          WRITE:/'Invalid Customer code ',
             gt_zgcs_foc-COMPANY, ' ',
             gt_zgcs_foc-CUSTOMER.
          STOP.
        ENDIF.
    *// part code check
        READ TABLE LT_MARA WITH KEY MATNR = gt_zgcs_foc-PART_CODE
          BINARY SEARCH.
        IF SY-SUBRC <> 0.
          WRITE:/ 'Invalid part code ', gt_zgcs_foc-PART_CODE.
          STOP.
        ENDIF.
    *// REF_NO
        TRANSLATE gt_zgcs_foc-REF_NO     TO UPPER CASE.
        SHIFT gt_zgcs_foc-REF_NO     LEFT DELETING LEADING SPACE.
        IF gt_zgcs_foc-REF_NO = SPACE.
          WRITE:/'Ref No. is blank'.
          STOP.
        ENDIF.
    *// REF_DATE
        IF gt_zgcs_foc-REF_DATE = 0.
          WRITE:/'Invalid Ref Date'.
          STOP.
        ENDIF.
    *// QTY
    *    IF gt_zgcs_foc-QTY CO ' 0123456789'.
    *    ELSE.
    *      WRITE:/ gt_zgcs_foc-QTY, ' Invalid Qty value'.
    *      STOP.
    *    ENDIF.
      ENDLOOP.
    * Insert/Update table
    *  MODIFY zgcs_foc FROM TABLE gt_zgcs_foc.
      INSERT zgcs_foc FROM TABLE gt_zgcs_foc.
      IF sy-subrc EQ 0.
        COMMIT WORK.
        DESCRIBE TABLE gt_zgcs_foc LINES update_cnt.
        error_cnt = read_cnt - update_cnt.
      ELSE.
        ROLLBACK WORK.
        error_cnt = read_cnt - update_cnt.
      ENDIF.
      ULINE.
      FORMAT COLOR 3.
      WRITE: / 'Read count                :', read_cnt.
      WRITE: / 'Insert/Update count       :', update_cnt.
      WRITE: / 'Error count               :', error_cnt.
      FORMAT COLOR OFF.
    *end-of-selection--------------------------------------------------
    END-OF-SELECTION.
    *&      Form FILE_UPLOAD_FROM_PC
    FORM file_upload_from_pc.
      IF pcfile IS INITIAL.
        WRITE: / 'SELECT UPLOAD FILE !'.
      ELSE.
        MOVE pcfile TO v_file.
    * HQ file upload
        IF HQfile EQ 'X'.
          CALL FUNCTION 'WS_UPLOAD'
               EXPORTING
                    filename                = v_file
                    filetype                = 'DAT'
               TABLES
                    data_tab                = FOC_inrec
               EXCEPTIONS
                    conversion_error        = 1
                    file_open_error         = 2
                    file_read_error         = 3
                    invalid_type            = 4
                    no_batch                = 5
                    unknown_error           = 6
                    invalid_table_width     = 7
                    gui_refuse_filetransfer = 8
                    customer_error          = 9
                    OTHERS                  = 10.
          IF sy-subrc <> 0.
            WRITE: / 'FILE UPLOAD                :', sy-subrc.
          ENDIF.
          LOOP AT FOC_inrec.
            ADD 1 TO read_cnt.
            call function 'CONVERSION_EXIT_ALPHA_INPUT'
                 exporting
                      input  = FOC_inrec-customer
                 importing
                      output = FOC_inrec-customer.
            call function 'CONVERSION_EXIT_ALPHA_INPUT'
                 exporting
                      input  = FOC_inrec-part_code
                 importing
                      output = FOC_inrec-part_code.
            MOVE-CORRESPONDING FOC_inrec TO gs_zgcs_foc.
            MOVE p_comp          TO gs_zgcs_foc-company.
            MOVE gs_zgcs_foc-qty TO gs_zgcs_foc-balan.
            MOVE sy-uname        TO gs_zgcs_foc-ERNAM.
            MOVE sy-datum        TO gs_zgcs_foc-ERDAT.
            MOVE sy-UZEIT        TO gs_zgcs_foc-ERZET.
    * Source(1:HQ,2:SUB,0:Etc)
            MOVE '1'             TO gs_zgcs_foc-source.
            APPEND gs_zgcs_foc TO gt_zgcs_foc.
          ENDLOOP.
    * SGE file upload
        ELSE.
          CALL FUNCTION 'WS_UPLOAD'
               EXPORTING
                    filename                = v_file
                    filetype                = 'DAT'
               TABLES
                    data_tab                = inrec
               EXCEPTIONS
                    conversion_error        = 1
                    file_open_error         = 2
                    file_read_error         = 3
                    invalid_type            = 4
                    no_batch                = 5
                    unknown_error           = 6
                    invalid_table_width     = 7
                    gui_refuse_filetransfer = 8
                    customer_error          = 9
                    OTHERS                  = 10.
          IF sy-subrc <> 0.
            WRITE: / 'FILE UPLOAD                :', sy-subrc.
          ENDIF.
          LOOP AT inrec.
            ADD 1 TO read_cnt.
            call function 'CONVERSION_EXIT_ALPHA_INPUT'
                 exporting
                      input  = inrec-customer
                 importing
                      output = inrec-customer.
            call function 'CONVERSION_EXIT_ALPHA_INPUT'
                 exporting
                      input  = FOC_inrec-part_code
                 importing
                      output = FOC_inrec-part_code.
            MOVE-CORRESPONDING inrec TO gs_zgcs_foc.
            MOVE p_comp          TO gs_zgcs_foc-company.
            MOVE gs_zgcs_foc-qty TO gs_zgcs_foc-balan.
            MOVE sy-uname        TO gs_zgcs_foc-ERNAM.
            MOVE sy-datum        TO gs_zgcs_foc-ERDAT.
            MOVE sy-UZEIT        TO gs_zgcs_foc-ERZET.
    * Source(1:HQ,2:SUB,0:Etc)
            MOVE '2'             TO gs_zgcs_foc-source.
            APPEND gs_zgcs_foc TO gt_zgcs_foc.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDFORM.
    *MODULE POOL::*
    *& Module Name      : Warranty Bill
    *& Sub-Module       : W/B
    *& Description      : Parts Q'ty Adjust(Sales & Warranty)
    *& Program Name     : ZRSWBP004
    *& History
    *& Date             Author            Reason
    *& 2007.05.08       Song, Ji-Hyun     Initial Coding     Req.by WH.Song
    *& Logic Process
    *  - CONDITIONS
    *    Company, Customer, Material
    *  - PROCESS
    *    Display,Insert,Update data in the T/B ZESP04
    REPORT  zrswbp004 NO STANDARD PAGE HEADING
                      MESSAGE-ID 00
                      LINE-SIZE  250
                      LINE-COUNT 50.
    *               G L O B A L    V A R I A B L E S                       *
    TABLES : zesp04.
    DATA : BEGIN OF itab_list OCCURS 0,
            company       LIKE zesp04-company,
            customer      LIKE zesp04-customer,
            material      LIKE zesp04-material,
            adj_date      LIKE zesp04-adj_date,
            adjust        LIKE zesp04-adjust,
            reason        LIKE zesp04-reason,
            reason_code   LIKE zesp04-reason_code,
            doc_no        LIKE zesp04-doc_no,
            in_date       LIKE zesp04-in_date,
            create_id     LIKE zesp04-create_id,
          END OF itab_list.
    DATA : itab_upload LIKE TABLE OF zesp04 WITH HEADER LINE.
    DATA : s_mode(10).
    DATA : table_name(10) VALUE 'ZESP04'.
    DATA : tot_cnt TYPE i.
    DATA : ref_flag(1).
    *               M A C R O    D E F I N E                               *
    DEFINE conversion_kunnr.
      call function 'CONVERSION_EXIT_ALPHA_INPUT'
           exporting
                input  = &1
           importing
                output = &1.
    END-OF-DEFINITION.
    DEFINE conversion_material.
      call function 'CONVERSION_EXIT_MATN1_INPUT'
           exporting
                input  = &1
           importing
                output = &1.
    END-OF-DEFINITION.
    *               S E L E C T I O N   S C R E E N                        *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME  TITLE title1.
    PARAMETERS     : company LIKE zesp04-company MEMORY ID buk MODIF ID v1
                     OBLIGATORY.
    SELECT-OPTIONS : customer   FOR zesp04-customer MEMORY ID kun
                                                    MODIF ID v1.
    SELECT-OPTIONS : material   FOR zesp04-material MEMORY ID mat
                                                    MODIF ID v1.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 3.
    SELECTION-SCREEN COMMENT 3(12) text-002 MODIF ID v2.
    PARAMETERS : up_flag AS CHECKBOX MODIF ID v2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(12) text-001 MODIF ID v2.
    PARAMETERS : p_fname(300) LOWER CASE MODIF ID v2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME  TITLE title2.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(53) text-003 MODIF ID v2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(10) text-004 MODIF ID v2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(12) text-005 MODIF ID v2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(12) text-006 MODIF ID v2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(15) text-007 MODIF ID v2.
    PARAMETERS : df1 TYPE c RADIOBUTTON GROUP grp1.
    SELECTION-SCREEN COMMENT 24(13) text-012 MODIF ID v2.
    PARAMETERS : df2 TYPE c RADIOBUTTON GROUP grp1.
    SELECTION-SCREEN COMMENT 41(11) text-013 MODIF ID v2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(14) text-008 MODIF ID v2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(11) text-009 MODIF ID v2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(14) text-010 MODIF ID v2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(10) text-011 MODIF ID v2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b2.
    INCLUDE zrswbp004_pbo.
    INCLUDE zrswbp004_pai.
    INITIALIZATION.
      title1 = ' Parts Quantity Adjustment '.
      title2 = ' Text File Layout '.
    *            S T A R T   O F   S E L E C T I O N                       *
    TOP-OF-PAGE.
      PERFORM write_header.
    TOP-OF-PAGE DURING LINE-SELECTION.
      PERFORM write_header.
    START-OF-SELECTION.
      IF up_flag = 'X'.
        PERFORM upload_data.
      ELSE.
        PERFORM select_data.
        SET PF-STATUS 'PF01' EXCLUDING 'SAVE'.
        PERFORM display_data.
      ENDIF.
    AT USER-COMMAND.
      PERFORM user_command.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
      PERFORM get_filename.
    *&      Form  SELECT_DATA
    *       Select Data for Display
    FORM select_data.
      SELECT * FROM (table_name)
        INTO CORRESPONDING FIELDS OF TABLE itab_list
       WHERE company = company
         AND customer IN customer
         AND material IN material.
      CHECK sy-subrc <> 0.
      WRITE: 'No data found with your option.'.
    ENDFORM.                    " SELECT_DATA
    *&      Form  DISPLAY_DATA
    *       Display Data following Condition
    FORM display_data.
      LOOP AT itab_list.
        FORMAT COLOR 2 INTENSIFIED.
        WRITE : / '|' NO-GAP.
        WRITE :  (07) itab_list-company    CENTERED   NO-GAP, '|' NO-GAP,
                 (10) itab_list-customer   CENTERED   NO-GAP, '|' NO-GAP,
                 (20) itab_list-material   CENTERED   NO-GAP, '|' NO-GAP,
                 (10) itab_list-adj_date   CENTERED   NO-GAP, '|' NO-GAP,
                 (15) itab_list-adjust  RIGHT-JUSTIFIED  NO-GAP, '|'
    NO-GAP,
                 (55) itab_list-reason LEFT-JUSTIFIED NO-GAP, '|' NO-GAP,
                 (11) itab_list-reason_code CENTERED  NO-GAP, '|' NO-GAP,
                 (10) itab_list-doc_no      CENTERED  NO-GAP, '|' NO-GAP,
                 (10) itab_list-in_date  CENTERED   NO-GAP, '|' NO-GAP,
                 (12) itab_list-create_id  CENTERED   NO-GAP, '|' NO-GAP.
        FORMAT INTENSIFIED OFF.
        HIDE itab_list.
      ENDLOOP.
      WRITE : / sy-uline(171).
    ENDFORM.                    " DISPLAY_DATA
    *&      Form  WRITE_HEADER
    *       Write Report Header
    FORM write_header.
      DATA : line(1024).
      CLEAR line WITH '-'.
      DESCRIBE TABLE itab_list LINES tot_cnt.
      FORMAT INTENSIFIED ON.
      WRITE : 15 'Parts Quantity Adjustment'.
      SKIP.
      WRITE : / 'Total Count : ', tot_cnt.
      WRITE : /.
      WRITE : (171) sy-uline.
      WRITE : / '|' NO-GAP.
      WRITE : (07) 'Company'  CENTERED   NO-GAP, '|' NO-GAP,
              (10) 'Customer' CENTERED   NO-GAP, '|' NO-GAP,
              (20) 'Material' CENTERED   NO-GAP, '|' NO-GAP,
              (10) 'Adj. Date' CENTERED   NO-GAP, '|' NO-GAP,
              (15) 'Adjust' CENTERED   NO-GAP, '|' NO-GAP,
              (55) 'Reason' CENTERED   NO-GAP, '|' NO-GAP,
              (11) 'Reason Code' CENTERED   NO-GAP, '|' NO-GAP,
              (10) 'Doc No' CENTERED   NO-GAP, '|' NO-GAP,
              (10) 'IN DATE' CENTERED   NO-GAP, '|' NO-GAP,
              (12) 'CREATE ID' CENTERED   NO-GAP, '|' NO-GAP.
      WRITE : /(171) sy-uline.
      FORMAT INTENSIFIED OFF.
    ENDFORM.                    " WRITE_HEADER
    *&      Form  UPLOAD_DATA
    *       Data Upload from File
    FORM upload_data.
      DATA : l_filename LIKE rlgrap-filename,
             temp_dateformat TYPE dateformat.
      IF df1 = 'X'.
        temp_dateformat = 'YYYY.MM.DD'.
      ELSE.
        temp_dateformat = 'DD.MM.YYYY'.
      ENDIF.
      MOVE p_fname TO l_filename.
      CHECK l_filename NE space.
      CALL FUNCTION 'WS_UPLOAD'
           EXPORTING
                filename                = l_filename
                filetype                = 'DAT'
                dat_d_format            = temp_dateformat
           TABLES
                data_tab                = itab_list
           EXCEPTIONS
                conversion_error        = 1
                file_open_error         = 2
                file_read_error         = 3
                invalid_type            = 4
                no_batch                = 5
                unknown_error           = 6
                invalid_table_width     = 7
                gui_refuse_filetransfer = 8
                customer_error          = 9.
      IF sy-subrc NE 0.
        MESSAGE s000 WITH 'File upload is failed!'.
        STOP.
      ELSE.
        CLEAR : itab_upload, itab_upload[].
        LOOP AT itab_list.
          MOVE-CORRESPONDING itab_list TO itab_upload.
          conversion_kunnr    itab_upload-customer.
          conversion_material itab_upload-material.
          itab_upload-mandt     = sy-mandt.
          itab_upload-in_date   = sy-datum.
          itab_upload-create_id = sy-uname.
    *>>>>Insert by GSCHOI 2007.11.08
          IF itab_list-adj_date+0(6) NE sy-datum+0(6).
            MESSAGE i368 WITH 'Adjust month must same as current month!'.
            ROLLBACK WORK.
            STOP.
          ENDIF.
    *<<<<End
          APPEND itab_upload.
          INSERT INTO (table_name) VALUES itab_upload.
          IF sy-subrc EQ 0.
            CONTINUE.
          ELSEIF sy-subrc EQ 4.
            MESSAGE s368 WITH 'Duplicated Data Error!'.
            ROLLBACK WORK.
            STOP.
          ELSE.
            MESSAGE s368 WITH 'File Error!'.
            ROLLBACK WORK.
            STOP.
          ENDIF.
        ENDLOOP.
      ENDIF.
      IF sy-subrc EQ 0.
        MESSAGE s368 WITH 'Uploaded Successfully!'.
      ENDIF.
    ENDFORM.                    " UPLOAD_DATA
    *&      Form  USER_COMMAND
    *       User Command Execution in Screen 1000
    FORM user_command.
      MOVE-CORRESPONDING itab_list TO zesp04.
      CASE sy-ucomm.
        WHEN 'INSERT'.
          PERFORM insert_item.
        WHEN 'UPDATE'.
          PERFORM update_item.
        WHEN 'DISPLAY'.
          PERFORM display_item.
        WHEN 'REFRESH'.
          PERFORM refresh_list.
      ENDCASE.
      IF ref_flag = 'Y'.
        PERFORM refresh_list.
        CLEAR ref_flag.
      ENDIF.
    ENDFORM.                    " USER_COMMAND
    *&      Form  INSERT_ITEM
    *       When Clicking Insert Button
    FORM insert_item.
      CLEAR : s_mode.
      CLEAR : zesp04.
      s_mode = 'INSERT'.
      CALL SCREEN '100'.
    ENDFORM.                    " INSERT_ITEM
    *&      Form  UPDATE_ITEM
    *       When Clicking Update Button
    FORM update_item.
      CLEAR : s_mode.
      s_mode = 'UPDATE'.
      CALL SCREEN '100'.
    ENDFORM.                    " UPDATE_ITEM
    *&      Form  DISPLAY_ITEM
    *       When Clicking Display Button
    FORM display_item.
      CLEAR : s_mode.
      s_mode = 'DISPLAY'.
      CALL SCREEN '100'.
    ENDFORM.                    " DISPLAY_ITEM
    *&      Form  REFRESH_LIST
    *       When Clicking Refresh Button or Returning Display Screen
    FORM refresh_list.
      CLEAR : itab_list, itab_list[].
      PERFORM select_data.
      sy-lsind = sy-lsind - 1.
      PERFORM display_data.
    ENDFORM.                    " REFRESH_LIST
    *&      Form  GET_FILENAME
    *       Get Filename
    FORM get_filename.
      DATA: l_fname LIKE ibipparms-path .
      DATA : p_name LIKE sy-repid.
      p_name = sy-repid.
      CALL FUNCTION 'F4_FILENAME'
           EXPORTING
                program_name  = p_name
                dynpro_number = sy-dynnr
                field_name    = ''
           IMPORTING
                file_name     = l_fname.
      p_fname = l_fname.
    ENDFORM.                    " GET_FILENAME
    Edited by: Matt on Nov 24, 2008 11:24 AM - surrounded the ABAP with  tags

    Hi,
        Use SUBMIT statement in your first Report zrswbgcs009 at the end, to call the Modulepool program zrswbp004.
    do a search in SDN you will get lot of threads on SUBMIT statement with selection screen.
    SUBMIT... [VIA SELECTION-SCREEN]
               [USING SELECTION-SET <var>]
               [WITH <sel> <criterion>]
               [WITH FREE SELECTIONS <freesel>]
               [WITH SELECTION-TABLE <rspar>].
    http://help.sap.com/saphelp_nw04/Helpdata/EN/9f/dba51a35c111d1829f0000e829fbfe/content.htm
    Regards
    Bala Krishna

  • How to make a fld mandatory in module pool program?

    I need help on following 2 things
    I have module pool program created, in that many screen subscreens created.
    1.I want to make a field mandatory
    second one  is, I have a general tab and  data tab.
    General tab screen - 2101
    Data tab = 2102
    In general tab, I have edited the values (change mode), when change the values and try to save it,
    It is holding old value.but If i exucute the transaction once again, it is showing the changed value(new value)
    For ex: there is a date field  value is 03/08/2009
    If I change this to 03/09/2009 and press on Save button from the standard menu, still it is showing the  value 03/08/2009. but I execute this transaction once again it is showing the value as 03/09/2009
    I will be thankful if someone helps me here

    Hi Chitra,
    Go to the properties of the filed select program tab and say input required.
    then you will get the problem solved.
    For second one actually its saving but not displaying the saved value at the same time ,
    for this you write the select statement after saving , so that once save is execute m, select statement also will execute  and it will display the newly saved value.
    so after saving imdeatly u write the select statement.
    like case sy-ucomm.
    when 'SAVE'.
    insert ztable.
    select filed from z table.
    endcase.
    let me know if ur problem solved.
    Regards
    Rajendra

  • How to create Long Text in Module Pool Program

    Hi all,
    I want to develop a new module pool program and I want to use Long text screen in this program and also want this text will store in table.I never develop such type of module pool before.This long text will like sales order long text.Please let me know the steps how I can develop such type of program and how I save long text huge data in table.
    Thanks & Regards
    Nirmal

    Hai ,
    here you have to use custom control, for this
    DATA: line(256) TYPE c,
          text_tab LIKE STANDARD TABLE OF line,
          field LIKE line.
    1)  Create custom control in your screen
    2)   CREATE OBJECT: container EXPORTING container_name = 'TEXTEDIT',   "--> (this is custom control name in screen)
                       editor    EXPORTING parent = container.
    3)  CALL METHOD editor->get_text_as_stream  "This method reads data from custom control , inserts into itab 'text_tab' 
             IMPORTING       
              text = text_tab.                                       "
          READ TABLE text_tab  INTO line INDEX 1. read the text into wa 'line'
    if you want more clarity , see  'ABAPDOCU' >ABAP USER DIALOGS>    COMPLEXSCREEN ELEMENTS-->  DEMO CUSTOM_CONTROL

  • How to Use F4 help in Module Pool Programming??????

    Hi Friends,
    This is Jagadeesh, I have an issue Module Pool Programming. Any of you can go through on this and can give an required answer.
    Issue is as follows,
    I have an Input/Output field for that i need to give f4 help, based on that field the related data should sit in to my table control. The thing is there is no relation between the input/output field and the table control fields.
    Is this possible? If so how can i do this.

    Hi Jagadeesh,
    For F4 Values on Screen:
    PROCESS ON VALUE_REQUEST
    using module call starting with FIELD i.e FIELD field MODULE module
    There are number of function modules that can be used for the purpose, but these
    can fullfill the task easily or combination of them.
    DYNP_VALUE_READ
    F4IF_FIELD_VALUE_REQUEST
    F4IF_INT_TABLE_VALUE_REQUEST
    POPUP_WITH_TABLE_DISPLAY
    DYNP_VALUE_READ
    This function module is used to read values in the screen fields. Use of this
    FM causes forced transfer of data from screen fields to ABAP fields.
    There are 3 exporting parameters
    DYNAME = program name = SY-CPROG
    DYNUMB = Screen number = SY-DYNNR
    TRANSLATE_TO_UPPER = 'X'
    and one importing TABLE parameter
    DYNPFIELDS = Table of TYPE DYNPREAD
    The DYNPFIELDS parameter is used to pass internal table of type DYNPREAD
    to this FM and the values read from the screen will be stored in this table.This
    table consists of two fields:
    FIELDNAME : Used to pass the name of screen field for which the value is to
    be read.
    FIELDVALUE : Used to read the value of the field in the screen.
    e.g.
    DATA: SCREEN_VALUES TYPE TABLE OF DYNPREAD ,
    SCREEN_VALUE LIKE LINE OF SCREEN_VALUES.
    SCREEN_VALUE-FIELDNAME = 'KUNNR' . * Field to be read
    APPEND SCREEN_VALUE TO SCREEN_VALUES. * Fill the table
    CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
    DYNAME = SY-CPROG
    DYNUMB = SY-DYNNR
    TRANSLATE_TO_UPPER = 'X'
    TABLES
    DYNPFIELDS = SCREEN_VALUES.
    READ TABLE SCREEN_VALUES INDEX 1 INTO SCREEN_VALUE.Now the screen value for field KUNNR is in the SCREEN_VALUE-FIELDVALUE and can be used for further processing like using it to fill the internal table to be used as parameter in F4IF_INT_TABLE_VALUE_REQUEST ETC.
    F4IF_FIELD_VALUE_REQUEST
    This FM is used to display value help or input from ABAP dictionary.We have to pass the name of the structure or table(TABNAME) along with the field name(FIELDNAME) . The selection can be returned to the specified screen field if three
    parameters DYNPNR,DYNPPROG,DYNPROFIELD are also specified or to a table if RETRN_TAB is specified.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    TABNAME = table/structure
    FIELDNAME = 'field name'
    DYNPPROG = SY-CPROG
    DYNPNR = SY-DYNR
    DYNPROFIELD = 'screen field'
    IMPORTING
    RETURN_TAB = table of type DYNPREAD
    F4IF_INT_TABLE_VALUE_REQUEST
    This FM is used to dsiplay values stored in an internal table as input
    help.This FM is used to program our own custom help if no such input help
    exists in ABAP dictionary for a particular field. The parameter VALUE_TAB is used to pass the internal table containing input values.The parameter RETFIELD
    is used to specify the internal table field whose value will be returned to the screen field or RETURN_TAB.
    If DYNPNR,DYNPPROG and DYNPROFIELD are specified than the user selection is passed to the screen field specified in the DYNPROFIELD. If RETURN_TAB is specified the selectionis returned in a table.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    RETFIELD = field from int table whose value will be returned
    DYNPPROG = SY-CPROG
    DYNPNR = SY-DYNNR
    DYNPROFIELD = 'screen field'
    VALUE_ORG = 'S'
    TABLES
    VALUE_TAB = internal table whose values will be shown.
    RETURN_TAB = internal table of type DDSHRETVAL
    EXCEPTIONS
    parameter_error = 1
    no_values_found = 2
    others = 3.
    POPUP_WITH_TABLE_DISPLAY
    This FM is used to display the contents of an internal table in a popup window.The user can select a row and the index of that is returned in the CHOISE
    parameter.The VALUETAB is used to pass the internal table.
    A suitable title can be set using TITLETEXT parameter. The starting and end position of the popup can be specified by the parameters STARTPOS_COL / ROW and ENDPOS_ROW / COL .
    CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
    EXPORTING
    ENDPOS_COL =
    ENDPOS_ROW =
    STARTPOS_COL =
    STARTPOS_ROW =
    TITLETEXT = 'title text'
    IMPORTING
    CHOISE =
    TABLES
    VALUETAB =
    EXCEPTIONS
    BREAK_OFF = 1
    OTHERS = 2.
    e.g.
    DATA: w_choice TYPE SY-TABIX.
    DATA: BEGIN OF i_values OCCURS 0 WITH HEADER LINE,
    values TYPE I,
    END OF i_values.
    PARAMETRS : id TYPE I.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR id
    i_values-values = '0001'.
    APPEND i_values.
    i_values-values = '0002'.
    APPEND i_values.
    i_values-values = '0003'.
    APPEND i_values.
    i_values-values = '0004'.
    APPEND i_values.
    CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
    EXPORTING
    ENDPOS_COL = 40
    ENDPOS_ROW = 12
    STARTPOS_COL = 20
    STARTPOS_ROW = 5
    TITLETEXT = 'Select an ID'
    IMPORTING
    CHOISE = w_choice
    TABLES
    VALUETAB = i_values
    EXCEPTIONS
    BREAK_OFF = 1
    OTHERS = 2.
    CHECK w_choice > 0.
    READ TABLE i_values INDEX w_choice....now we can process the selection as it is contained
    ...in the structure i_values.
    Other FM that may be used to provide input help is HELP_START .
    regards,
    Dj
    reward for all useful answers.

Maybe you are looking for

  • How to download a file from a custom server location?

    Hello experts, I have the following scenario: A BAPI creates an .exe file and stores it in a custom folder in the server where the portal (and my WD application) is running. This happens once a day. What I need to do is create a link or button (doesn

  • Vista and Fireworks CS3

    I just bought a new desktop (Vista Home Premium, Pentium Dual Core @1.6, 2024 ram, HDD 320 @ 7200) and installed CS3 Web Premium (Which worked well on my slower XP Pro laptop). Fireworks simply will not work. I've read some of the posts related to th

  • Regarding parking document

    Hi ,     i need to develop parking document report. to develop this u go to tcode fbv3 .here u find the park document no. when u double click on park document it will show line item wise park document display.       i need to develop this report line

  • Sending 2 messages from SAP but get 1 message in PI

    Hi all, This is a bit of a strange one but I have the situation where we send two idocs at the same time from a SAP ECC system to PI. The first idoc is processed but the second one just dissapears. Things I have checked: SMQ1/SMQ2 on both systems - n

  • Abstract class instantiation.?

    I have an Abstract class which is extended My question is: How can the Abstract class be instantiated: Animal[] ref = new Animal[3]; In Java,we cannot instantiate Abstract class,so how does this work abstract class Animal  // class is abstract   priv