Hi friends its urgent
hi experts.
iam trying to do the Out bound interfaces in abap.
the requirment is like this, i hav to get the fields like invoice no, invo date, invo Amt, paid Amt ,balance and corrency from the BSID.
i hav to generate a text file and place it on the application server with all the above info of the given customer number.
it should be the background job.
when program executes one log should be generates which will contain no of invocies of that perticular customer.
this is my requirment plz let me know how can i solve this.
give some code which is related to this requirement.
thanks in advance.
Hi ,
Select required fields from bsid ,then transfer to required internal table as er ur required .
then use
OPEN DATASET DS_NAME( name of file ) FOR OUTPUT IN TEXT MODE.
LOOP AT TAB_WA.
TRANSFER TAB_WA TO DS_NAME.
IF SY-SUBRC NE 0.
MESSAGE E001(MG) WITH DS_NAME.
ENDIF.
ENDLOOP.
Please reward if useful.
Similar Messages
-
How to install adapters in pi 7.0 ex(tibco adapter) its urgent plz help
hi friends
can any one help me how to insatlll the tibco adapter in pi 7.0 its urgent plz help
thanks in advance
bye
rajaHi Raj,
Is your Sender System Tibco If so Use JMS Adapter to get the Data from tibco and Use IDOC Adapter to Post in R3. For this you no need to Install any Adapter in XI System.
Similar discussions ,
XI integration with Tibco
XI Integration with Tibco EMS (Using JMS Adapter)
Regards
Agasthuri Doss -
Table control...? its urgent
Hi friends,
Can anyone gve me example table control program..
My requirement is I have to display blank table control.....but when user enetrs value.. and submits it should be added to the inetrnal table in my program please help......
Also if he wants to see the records in table control..which he enetered earlier the table should be displayed as populated..
Please help its urgent....points will be rewarded....Seet he following ex:
Created table control using wizard.
*& Module pool ZTEST_TBLCTRL
PROGRAM ZTEST_TBLCTRL.
***&SPWIZARD: DATA DECLARATION FOR TABLECONTROL 'TC1'
*&SPWIZARD: DEFINITION OF DDIC-TABLE
TABLES: ZFG_SRNO, ZFIH0004.
*&SPWIZARD: TYPE FOR THE DATA OF TABLECONTROL 'TC1'
*TYPES: BEGIN OF T_TC1,
ZSRNO LIKE ZFG_SRNO-ZSRNO,
SCRNAME LIKE ZFIH0004-SCRNAME,
END OF T_TC1.
*TYPES: BEGIN OF T_TC1.
STRUCTURE ZFG_SRNO.
END OF T_TC1.
*&SPWIZARD: INTERNAL TABLE FOR TABLECONTROL 'TC1'
*DATA: G_TC1_ITAB TYPE T_TC1 OCCURS 0 WITH HEADER LINE,
G_TC1_WA TYPE T_TC1. "work area
DATA: G_TC1_ITAB LIKE ZFG_SRNO OCCURS 0 WITH HEADER LINE,
G_TC1_WA LIKE G_TC1_ITAB. "work area
DATA: G_TC1_COPIED. "copy flag
*&SPWIZARD: DECLARATION OF TABLECONTROL 'TC1' ITSELF
CONTROLS: TC1 TYPE TABLEVIEW USING SCREEN 0100.
*&SPWIZARD: LINES OF TABLECONTROL 'TC1'
DATA: G_TC1_LINES LIKE SY-LOOPC.
DATA: OK_CODE LIKE SY-UCOMM,
S_CODE LIKE SY-UCOMM,
MARK.
DATA: T1(10).
*&SPWIZARD: OUTPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: COPY DDIC-TABLE TO ITAB
MODULE TC1_INIT OUTPUT.
IF G_TC1_COPIED IS INITIAL.
*&SPWIZARD: COPY DDIC-TABLE 'ZFG_SRNO'
*&SPWIZARD: INTO INTERNAL TABLE 'g_TC1_itab'
SELECT * FROM ZFG_SRNO
INTO CORRESPONDING FIELDS
OF TABLE G_TC1_ITAB.
G_TC1_COPIED = 'X'.
REFRESH CONTROL 'TC1' FROM SCREEN '0100'.
IF T1 <> SPACE.
G_TC1_ITAB-ZSRNO = T1.
CLEAR T1.
APPEND G_TC1_ITAB.
REFRESH CONTROL 'TC1' FROM SCREEN '0100'.
ENDIF.
*TC1-TOP_LINE = 1.
ENDIF.
ENDMODULE.
*&SPWIZARD: OUTPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: MOVE ITAB TO DYNPRO
MODULE TC1_MOVE OUTPUT.
MOVE-CORRESPONDING G_TC1_WA TO ZFG_SRNO.
if sy-subrc ne 0.
*append G_TC1_WA to G_TC1_ITAB.
*endif.
READ TABLE G_TC1_ITAB INDEX TC1-CURRENT_LINE.
IF SY-SUBRC = 0.
G_TC1_WA-ZSRNO = G_TC1_ITAB-ZSRNO.
ENDIF.
MOVE-CORRESPONDING G_TC1_ITAB TO ZFG_SRNO.
REFRESH CONTROL 'TC1' FROM SCREEN '8001'.
tc1-lines = G_TC1_LINES + 100.
ENDMODULE.
*&SPWIZARD: OUTPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: GET LINES OF TABLECONTROL
MODULE TC1_GET_LINES OUTPUT.
G_TC1_LINES = SY-LOOPC.
ENDMODULE.
*&SPWIZARD: INPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: MODIFY TABLE
MODULE TC1_MODIFY INPUT.
*break-point.
MOVE-CORRESPONDING ZFG_SRNO TO G_TC1_ITAB.
MODIFY G_TC1_ITAB INDEX TC1-CURRENT_LINE.
G_TC1_COPIED = 'X'.
REFRESH CONTROL 'TC1' FROM SCREEN '8001'.
MOVE-CORRESPONDING ZFG_SRNO TO G_TC1_WA.
MODIFY G_TC1_ITAB
FROM G_TC1_WA
INDEX TC1-CURRENT_LINE.
G_TC1_COPIED = 'X'.
if sy-subrc ne 0.
append G_TC1_WA to G_TC1_ITAB.
endif.
*modify G_TC1_ITAB INDEX TC1-CURRENT_LINE.
ENDMODULE.
*&SPWIZARD: INPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: PROCESS USER COMMAND
MODULE TC1_USER_COMMAND INPUT.
OK_CODE = SY-UCOMM.
PERFORM USER_OK_TC USING 'TC1'
'G_TC1_ITAB'
'FLAG'
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
*& Module D20XX_INIT OUTPUT
text
MODULE D20XX_INIT OUTPUT.
*if screen-name = 'ZSRNO'.
SCREEN-INPUT = 0.
SCREEN-COLOR = 0.
MODIFY SCREEN.
endif.
ENDMODULE. " D20XX_INIT OUTPUT
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
*CLEAR R1_REF.
DO 30 TIMES.
APPEND G_TC1_ITAB.
ENDDO.
DESCRIBE TABLE G_TC1_ITAB LINES TC1-LINES.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module TAB1_INIT OUTPUT
text
MODULE TAB1_INIT OUTPUT.
ENDMODULE. " TAB1_INIT OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module MESSAGE INPUT
text
MODULE MESSAGE INPUT.
OK_CODE = SY-UCOMM.
S_CODE = OK_CODE.
CLEAR OK_CODE.
if S_CODE = 'DELE'.
loop at G_TC1_ITAB.
if G_TC1_ITAB-scrname = 'X'.
delete g_tc1_itab.
endif.
endloop.
ELSEIF S_CODE = 'SAVE'.
G_TC1_WA-ZSRNO = T1.
MOVE-CORRESPONDING G_TC1_WA TO ZFG_SRNO.
REFRESH CONTROL 'TC1' FROM SCREEN '0100'.
ENDIF.
ENDMODULE. " MESSAGE INPUT
*& Module DELETE_RECORD INPUT
text
MODULE DELETE_RECORD INPUT.
IF MARK = 'X' AND S_CODE = 'DELE'.
DELETE TABLE G_TC1_ITAB FROM ZFG_SRNO.
DESCRIBE TABLE G_TC1_ITAB LINES TC1-LINES.
ENDIF.
ENDMODULE. " DELETE_RECORD INPUT
*********************Screen modules*********************
PROCESS BEFORE OUTPUT.
*&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'TC1'
MODULE TC1_INIT.
*&SPWIZARD: MODULE TC1_CHANGE_TC_ATTR.
*&SPWIZARD: MODULE TC1_CHANGE_COL_ATTR.
LOOP AT G_TC1_ITAB
INTO G_TC1_WA
WITH CONTROL TC1
CURSOR TC1-CURRENT_LINE.
*&SPWIZARD: MODULE TC1_CHANGE_FIELD_ATTR
MODULE TC1_MOVE.
MODULE TAB1_INIT.
MODULE TC1_GET_LINES.
ENDLOOP.
MODULE D20XX_INIT.
MODULE STATUS_0100.
PROCESS AFTER INPUT.
*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'TC1'
*BREAK POINT.
LOOP AT G_TC1_ITAB.
CHAIN.
FIELD ZFG_SRNO-ZSRNO.
MODULE TC1_MODIFY ON CHAIN-REQUEST.
MODULE TC1_MODIFY.
ENDCHAIN.
MODULE MESSAGE .
MODULE DELETE_RECORD.
ENDLOOP.
MODULE TC1_USER_COMMAND.
*&SPWIZARD: MODULE TC1_CHANGE_TC_ATTR.
*&SPWIZARD: MODULE TC1_CHANGE_COL_ATTR.
MODULE USER_COMMAND_0100. -
Please its urgent - I am planing to buy Iphone 4 in korea .. after it's working in India GSM - OR NOT??
If you buy an iphone 4 in Korea, it is carrier locked to SK telecom or Show, depending on which carrier you get it from. However you can request an unlock from the carrier, it is called, "Country Lock' in Korea. Normal procedure is you buy the iphone there, you then dial 114 on your iphone, and speak with the customer support. Ask them to Country Lock (unlock) the iphone. If you can't speak Korean, but have a Korean friend, let your friend do it for you.
It will take a few days and you will receive a text message notifying you that your Country Lock is ready. Then connect to itunes, follow the steps. -
How to control CPU Utilazation on linux, Its URGENT
Hi Friends,
Our Os is Linux. And weblogic server is running on production mode.
time to time CPU usage is reaching till 90%. I checked from console
that there are standby process. Please help me to controll CPU usage.
At what point should I concentrate.
Please help me. its urgent.In our application that is CMS(Content Management System), has used Unsynchonized HashMap.
Is this causing High CPU Utilization, and what may be other root cause for the same.
Plaese help me. -
Linking vacancy in OM with recruitment - Its urgent
Hi Friends,
Could you please tell me how to link a vacancy in OM with recruitment module.
The vacancy has been created in OM using PO13.
I believe i need to have integration between OM and recruitment for the same.
Please advise, what configurations ettings are required to be done.
Its urgent,go to IMG
pres ctrl f and give intefaration with om
or else check in the authorisations whether the switch for recruitments is on or off
revert back if u have any query
u will find
sikindar
Plogi PPVAC is the value -
hai friends
my reequirement is extracting data from 4.6 c for purchase order me21 into flat file format.(tab delimitter) .currently we are working on ecc 6 version.i had already written bdc code for me21 in ecc6 version for uploading data.
please help me its urgent.
give any sample code for writing extract programHi Friend,
if it help full to u please give me max point.i am sending code.
REPORT ZMXX0295 LINE-SIZE 132 NO STANDARD PAGE HEADING.
+
Comparisom of PIR or Contract price with latest PO price
+
This program was created to compare PIR prices or contract prices
with the latest PO price.
It reads the source lists for the specified materials to determine
the PIR or contract prices. Afterwards it reads the PO history to
get the purchase order prices.
The material to be processed can either be selected from the data
base (material master) or via an PC upload file.
The output can be sorted in different variants.
+
+
*eject
Definition of database tables --------------------------------------+
TABLES: EINA, "Purchasing Info Record: General Data
EINE, "PIR: Purchasing Organization Data
EIPA, "Order Price History, Info Record
EKAB, "Contract Release Documentation
*EKKO, "Contract / PO header
EKKO, "Contract / PO header
*EKPO, "Contract / PO item
EKPO, "Contract / PO item
EORD, "Source list
TCURC. "Currency codes
*eject
Definition of internal tables / data -------------------------------+
DATA: BEGIN OF MAT_PRICE OCCURS 0,
VRTYP LIKE EORD-VRTYP, "Document type
INFNR LIKE EINE-INFNR, "Info record / Contract
MATNR LIKE EINA-MATNR, "Material
WERKS LIKE EINE-WERKS, "Plant
EKORG LIKE EINE-EKORG, "Purch. organization
LIFNR LIKE EINA-LIFNR, "Vendor
FLIFN LIKE EORD-FLIFN, "Fix Vendor
IRPRS LIKE EINE-NETPR, "Info record price
PEINH LIKE EINE-PEINH, "Price unit
EBELN LIKE EIPA-EBELN, "PO header
EBELP LIKE EIPA-EBELP, "PO item
BEDAT LIKE EIPA-BEDAT, "PO date
POPRS LIKE EIPA-LPREI, "PO price
LPEIN LIKE EIPA-LPEIN, "Price unit
MENGE LIKE EKPO-MENGE, "PO quantity
MEINS LIKE EKPO-MEINS, "PO unit of measure
END OF MAT_PRICE.
DATA: BEGIN OF MAT_SEL OCCURS 0,
MATNR LIKE EINA-MATNR,
END OF MAT_SEL.
DATA: T_EORD LIKE EORD OCCURS 0 WITH HEADER LINE.
DATA: CURSORFIELD(15), "Fieldname of Cusor pos
INV_DATE LIKE SY-DATUM, "Inverted date
W_EFFPR LIKE EINE-EFFPR. "Hiwi price
DATA: W_FILE TYPE STRING. "JAN29NOV05
CONSTANTS: C_0(01) TYPE C VALUE '0',
C_F(01) TYPE C VALUE 'F',
C_I(01) TYPE C VALUE 'I',
C_K(01) TYPE C VALUE 'K',
C_X(01) TYPE C VALUE 'X'.
CONSTANTS: C_ASC(10) TYPE C VALUE 'ASC'. "JAN29NOV05
*eject
Definition of selection screen -------------------------------------+
SELECTION-SCREEN BEGIN OF BLOCK B01 WITH FRAME TITLE TEXT-B01.
PARAMETERS: P_DBASE RADIOBUTTON GROUP R01. "Read mat's via select.
SELECT-OPTIONS: S_MATNR FOR EINA-MATNR. "Material
SELECTION-SCREEN ULINE.
PARAMETERS: P_XFILE RADIOBUTTON GROUP R01, "Read mat's via PC file
P_DATEI LIKE RLGRAP-FILENAME. "PC file with MATNR's
SELECTION-SCREEN SKIP.
SELECT-OPTIONS: S_MATKL FOR EINA-MATKL, "Material group
S_WERKS FOR EINE-WERKS, "Plant
S_EKORG FOR EINE-EKORG, "Purch. organization
S_BEDAT FOR EIPA-BEDAT. "PO price date
PARAMETERS: P_WAERS LIKE EINE-WAERS "Output currency
OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B01.
*eject
Process after input ------------------------------------------------+
AT SELECTION-SCREEN ON P_WAERS.
PERFORM READ_TCURC.
AT SELECTION-SCREEN ON P_DATEI.
IF NOT P_XFILE IS INITIAL
AND P_DATEI IS INITIAL.
MESSAGE E999(ZZ) WITH 'Please sepcify PC file name'.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_DATEI.
PERFORM CALL_WS_EXPLORER.
*eject
Start of main program ----------------------------------------------+
START-OF-SELECTION.
IF NOT P_XFILE IS INITIAL.
PERFORM UPLOAD_MATERIAL_SELECTION. "Read mat's from file
IF MAT_SEL[] IS INITIAL.
MESSAGE E999(ZZ) WITH
'No records were found in file'(E01) P_DATEI(40).
ELSE.
PERFORM GET_MATERIAL_SELECTION. "Process upload file
ENDIF.
ENDIF.
PERFORM SOME_REWORK.
PERFORM PROCESS_MATERIALS. "Process mat. selection
END-OF-SELECTION.
End of Main program ------------------------------------------------+
SET PF-STATUS 'LIST'.
SORT MAT_PRICE BY MATNR WERKS EKORG POPRS.
PERFORM AUSGABE.
IF SY-SUBRC EQ 0.
MESSAGE I999(ZZ) WITH TEXT-002.
MESSAGE S999(ZZ) WITH TEXT-001
'Material/Plant/PurchOrg/PO Price'(003).
ENDIF.
*eject
User commands - interactive reporting ...
AT USER-COMMAND.
IF SY-UCOMM EQ 'ORDR'.
PERFORM DISPLAY_ORDER.
ENDIF.
AT LINE-SELECTION.
PERFORM CHANGE_SORT_SEQUENCE.
*eject
+
TOP-OF-PAGE
+
TOP-OF-PAGE.
PERFORM LIST_HEADER.
*eject
+
TOP-OF-PAGE during line-selection.
+
TOP-OF-PAGE DURING LINE-SELECTION.
PERFORM LIST_HEADER.
*eject
Form CALL_WS_EXPLORER
FORM CALL_WS_EXPLORER.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_FILENAME = '*.txt,' "JAN29NOV05
DEF_FILENAME = '*.txt' "JAN29NOV05
DEF_PATH = 'D:\'
MASK =
Block Changed From Here JAN29NOV05
'Text files,.txt,Data files,.dat,All files,.,.'(MSK)
' Text files,.txt,Data files,.dat,All files,.,.'(MSK)
Block Changed Till Here JAN29NOV05
MODE = 'O'
TITLE = 'Upload Materials to be processed'(004)
IMPORTING
FILENAME = P_DATEI
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4.
ENDFORM. " CALL_WS_EXPLORER
*eject
Form PROCESS_MATERIALS
Read source list for specified materials and then process
either PIR or contracts.
FORM PROCESS_MATERIALS.
PERFORM READ_MATERIAL_SOURCE_LIST.
LOOP AT T_EORD.
CLEAR W_EFFPR.
TRANSLATE T_EORD-VRTYP USING ' I'. "Set I = Infor record
IF T_EORD-VRTYP EQ C_I.
PERFORM GET_PIR_INFORMATION.
ELSE.
T_EORD-FLIFN = T_EORD-FEBEL.
PERFORM GET_CONTRACT_INFORMATION.
ENDIF.
ENDLOOP.
ENDFORM. " PROCESS_MATERIALS
*eject
Form GET_MATERIAL_SELECTION
FORM GET_MATERIAL_SELECTION.
SORT MAT_SEL.
CLEAR S_MATNR.
S_MATNR-OPTION = 'EQ'.
S_MATNR-SIGN = 'I'.
LOOP AT MAT_SEL WHERE
MATNR CO ' 0123456789'.
SHIFT MAT_SEL-MATNR RIGHT DELETING TRAILING ' '.
TRANSLATE MAT_SEL-MATNR USING ' 0'.
S_MATNR-LOW = MAT_SEL-MATNR.
APPEND S_MATNR.
ENDLOOP.
ENDFORM. " GET_MATERIAL_SELECTION
Form READ_EIPA
FORM READ_EIPA.
SELECT EBELN EBELP BEDAT
INTO CORRESPONDING FIELDS OF EIPA
FROM EIPA
UP TO 1 ROWS
WHERE INFNR EQ EINA-INFNR
AND WERKS EQ T_EORD-WERKS
AND EKORG EQ T_EORD-EKORG
AND BEDAT IN S_BEDAT
ORDER BY BEDAT DESCENDING.
PERFORM READ_ADDITIONAL_PO_DATA
USING EIPA-EBELN EIPA-EBELP.
CHECK SY-SUBRC EQ 0.
PERFORM FILL_MAT_PRICE USING 'X' EINA-INFNR
EINE-EFFPR EINE-PEINH EINE-WAERS.
APPEND MAT_PRICE.
ENDSELECT.
ENDFORM. " READ_EIPA
*eject
Form FILL_MAT_PRICE
FORM FILL_MAT_PRICE USING
*ID X_EBELN X_EFFPR X_PEINH X_WAERS "JAN29NOV05
Block added from here JAN29NOV05
ID TYPE C
X_EBELN TYPE C
X_EFFPR TYPE EINE-EFFPR
X_PEINH TYPE EINE-PEINH
X_WAERS TYPE EINE-WAERS.
Block added till here JAN29NOV05
CLEAR MAT_PRICE.
IF X_WAERS NE P_WAERS.
PERFORM CONVERT_TO_OTHER_CURRENCY USING
X_EFFPR X_WAERS P_WAERS.
ENDIF.
MAT_PRICE-VRTYP = T_EORD-VRTYP. "PIR / Contract no.
MAT_PRICE-INFNR = X_EBELN. "PIR / Contract no.
MAT_PRICE-MATNR = T_EORD-MATNR. "Material
MAT_PRICE-LIFNR = T_EORD-LIFNR. "Vendor
MAT_PRICE-FLIFN = T_EORD-FLIFN. "Fix Vendor
MAT_PRICE-WERKS = T_EORD-WERKS. "Plant
MAT_PRICE-EKORG = T_EORD-EKORG. "Purch. organization
MAT_PRICE-IRPRS = X_EFFPR. "PIR / Contract price
MAT_PRICE-PEINH = X_PEINH. "PIR / Contract pr.unit
CHECK ID NE SPACE. "PO history found ?
latest PO data ...
IF EKKO-WAERS NE P_WAERS.
PERFORM CONVERT_TO_OTHER_CURRENCY USING
EKPO-EFFWR EKKO-WAERS P_WAERS.
ENDIF.
MAT_PRICE-EBELN = EKPO-EBELN. "PO number
MAT_PRICE-EBELP = EKPO-EBELP. "PO item
MAT_PRICE-BEDAT = EKKO-BEDAT. "PO date
IF EKPO-MENGE NE 0.
MAT_PRICE-POPRS = EKPO-EFFWR / ( EKPO-MENGE "Last PO price = value
EKPO-BPUMZ / EKPO-BPUMN ). " / Qty. in sales unit
ELSE.
MAT_PRICE-POPRS = EKPO-EFFWR. "Last PO value
ENDIF. "PO price unit
MAT_PRICE-LPEIN = EKPO-PEINH. "PO price unit
MAT_PRICE-MENGE = EKPO-MENGE. "PO quantity
MAT_PRICE-MEINS = EKPO-MEINS. "PO unit of measure
ENDFORM. " FILL_MAT_PRICE
*eject
Form CONVERT_TO_OTHER_CURRENCY
FORM CONVERT_TO_OTHER_CURRENCY USING
XVALUE FR_CURR TO_CURR. "JAN29NOV05
Block added from here JAN29NOV05
XVALUE TYPE ANY
FR_CURR TYPE EKKO-WAERS
TO_CURR TYPE EINE-WAERS.
Block added till here JAN29NOV05
CALL FUNCTION 'MS_CONVERT_TO_OTHER_CURRENCY'
EXPORTING
DATE = SY-DATUM
FROM_CURRENCY = FR_CURR
FROM_AMOUNT = XVALUE
TO_CURRENCY = TO_CURR
COMPANY_CURRENCY = 'EUR'
IMPORTING
TO_AMOUNT = XVALUE
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC NE 0.
MESSAGE E999(ZZ) WITH 'Currency conversion error from'(E02)
FR_CURR 'to' TO_CURR.
ENDIF.
ENDFORM. " CONVERT_TO_OTHER_CURRENCY
*eject
Form UPLOAD_MATERIAL_SELECTION
FORM UPLOAD_MATERIAL_SELECTION.
Block commented from here JAN29NOV05
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = P_DATEI
FILETYPE = 'DAT'
TABLES
DATA_TAB = MAT_SEL
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TABLE_WIDTH = 4
INVALID_TYPE = 5
NO_BATCH = 6
UNKNOWN_ERROR = 7
OTHERS = 8.
Block commented till here JAN29NOV05
Block added from here JAN29NOV05
MOVE P_DATEI TO W_FILE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = W_FILE
FILETYPE = C_ASC
HAS_FIELD_SEPARATOR = C_X
TABLES
DATA_TAB = MAT_SEL
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17.
Block added till here JAN29NOV05
IF SY-SUBRC NE 0.
MESSAGE E999(ZZ) WITH 'Error uploading from file'
P_DATEI(40).
ENDIF.
ENDFORM. " UPLOAD_MATERIAL_SELECTION
*eject
Form AUSGABE
FORM AUSGABE.
LOOP AT MAT_PRICE.
FORMAT COLOR 1 INTENSIFIED OFF.
WRITE: /01 MAT_PRICE-VRTYP, "Document type
03 MAT_PRICE-INFNR, "Info record / Contract
14 MAT_PRICE-MATNR, "Material
23 MAT_PRICE-WERKS, "Plant
28 MAT_PRICE-EKORG, "Purch. organization
33 MAT_PRICE-LIFNR, "Vendor
44 MAT_PRICE-FLIFN, "Fixed Vendor
46 MAT_PRICE-IRPRS NO-SIGN, "Info record price
61 MAT_PRICE-PEINH NO-SIGN. "IR price unit
FORMAT COLOR 2 INTENSIFIED.
IF NOT MAT_PRICE-EBELN IS INITIAL.
WRITE: 68 MAT_PRICE-POPRS NO-SIGN, "PO price
83 MAT_PRICE-LPEIN NO-SIGN, "PO price unit
90 MAT_PRICE-MENGE, "PO quantity
107 MAT_PRICE-MEINS, "PO unit of measure
111 MAT_PRICE-EBELN, "PO number
123 MAT_PRICE-BEDAT. "PO date
ELSE.
WRITE: 74 'No PO price was found'(005),
132 ' '.
ENDIF.
HIDE MAT_PRICE-VRTYP.
AT END OF MATNR.
SKIP.
ENDAT.
ENDLOOP.
CLEAR MAT_PRICE.
ENDFORM. " AUSGABE
*eject
Form READ_TCURC
FORM READ_TCURC.
CLEAR TCURC.
TCURC-WAERS = P_WAERS.
READ TABLE TCURC.
IF SY-SUBRC NE 0.
MESSAGE E999(ZZ) WITH P_WAERS 'Currency code invalid'(E03).
ENDIF.
ENDFORM. " READ_TCURC
*eject
Form LIST_HEADER
FORM LIST_HEADER.
FORMAT INTENSIFIED.
WRITE: /01 'Output currency'(006), 25 ': ', P_WAERS,
122 'Page'(007), SY-PAGNO,
/01 'Plant'(008), 25 ': from '(009), S_WERKS-LOW,
46 'to '(010), S_WERKS-HIGH,
/01 'Purchasing Organization'(011),
25 ': from '(009), S_EKORG-LOW,
46 'to '(010), S_EKORG-HIGH,
/01 'PO date'(012), 25 ': from '(009), S_BEDAT-LOW,
46 'to '(010), S_BEDAT-HIGH.
ULINE.
FORMAT COLOR 1.
WRITE: /01 TEXT-T01.
ULINE.
ENDFORM. " LIST_HEADER
*eject
Form CHANGE_SORT_SEQUENCE
FORM CHANGE_SORT_SEQUENCE.
GET CURSOR FIELD CURSORFIELD.
CASE CURSORFIELD+10(5).
WHEN 'EKORG'.
SORT MAT_PRICE BY MATNR EKORG POPRS.
PERFORM AUSGABE.
MESSAGE S999(ZZ) WITH TEXT-001
'Material/Purch.Organization/Info Rec.Price'(013).
WHEN 'BEDAT'.
SORT MAT_PRICE BY MATNR BEDAT POPRS.
PERFORM AUSGABE.
MESSAGE S999(ZZ) WITH TEXT-001
'Material/PO Date/Info Rec.Price'(014).
WHEN 'IRPRS'.
SORT MAT_PRICE BY MATNR IRPRS.
PERFORM AUSGABE.
MESSAGE S999(ZZ) WITH TEXT-001
'Material/Plant/Info Rec.Price'(015).
WHEN 'POPRS'.
SORT MAT_PRICE BY MATNR POPRS.
PERFORM AUSGABE.
MESSAGE S999(ZZ) WITH TEXT-001
'Material/Plant/PO Price'(016).
WHEN 'LIFNR'.
SORT MAT_PRICE BY MATNR LIFNR POPRS.
PERFORM AUSGABE.
MESSAGE S999(ZZ) WITH TEXT-001
'Material/Vendor/PO Price'(017).
WHEN OTHERS.
SORT MAT_PRICE BY MATNR WERKS EKORG POPRS.
PERFORM AUSGABE.
MESSAGE S999(ZZ) WITH TEXT-001
'Material/Plant/PurchOrg/PO Price'(018).
ENDCASE.
SY-LSIND = 0.
ENDFORM. " CHANGE_SORT_SEQUENCE
*eject
Form DISPLAY_ORDER
FORM DISPLAY_ORDER.
DATA: X_BELNR(10) TYPE C.
CLEAR CURSORFIELD.
GET CURSOR FIELD CURSORFIELD.
IF CURSORFIELD+10(5) NE 'EBELN' AND
CURSORFIELD+10(5) NE 'INFNR'.
MESSAGE I999(ZZ) WITH 'Invalid cursor position'.
EXIT.
ENDIF.
GET CURSOR FIELD CURSORFIELD VALUE X_BELNR.
CASE CURSORFIELD+10(5).
WHEN 'EBELN'. "Purchase order
SET PARAMETER ID 'BES' FIELD X_BELNR.
CALL TRANSACTION 'ME23' AND SKIP FIRST SCREEN.
WHEN 'INFNR'. "Info rec. / Contract
IF MAT_PRICE-VRTYP EQ C_I. "Info Record ...
SET PARAMETER ID 'INF' FIELD X_BELNR.
CALL TRANSACTION 'ME13' AND SKIP FIRST SCREEN.
ELSE. "Contract ...
SET PARAMETER ID 'VRT' FIELD X_BELNR.
CALL TRANSACTION 'ME33' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
CLEAR MAT_PRICE.
ENDFORM.
*eject
Form SOME_REWORK
FORM SOME_REWORK.
IF NOT S_BEDAT-LOW IS INITIAL AND "Align date for output
S_BEDAT-HIGH IS INITIAL.
S_BEDAT-HIGH = S_BEDAT-LOW.
MODIFY S_BEDAT INDEX 1.
ENDIF.
CONVERT DATE SY-DATUM INTO INVERTED-DATE "today's inverted date
INV_DATE.
ENDFORM. " SOME_REWORK
*eject
Form READ_ADDITIONAL_PO_DATA
FORM READ_ADDITIONAL_PO_DATA USING
X_EBELN X_EBELP. "JAN29NOV05
Block added from here JAN29NOV05
X_EBELN TYPE EIPA-EBELN
X_EBELP TYPE EIPA-EBELP.
Block added till here JAN29NOV05
SELECT SINGLE WAERS BEDAT
INTO CORRESPONDING FIELDS OF EKKO
FROM EKKO
WHERE EBELN EQ X_EBELN.
SELECT SINGLE EBELN EBELP MENGE MEINS
PEINH EFFWR BPUMZ BPUMN
INTO CORRESPONDING FIELDS OF EKPO
FROM EKPO
WHERE EBELN EQ X_EBELN
AND EBELP EQ X_EBELP
AND LOEKZ NE 'L'.
ENDFORM. " READ_ADDITIONAL_PO_DATA
*eject
Form READ_MATERIAL_SOURCE_LIST
Read source list entries for specified materials
FORM READ_MATERIAL_SOURCE_LIST.
SELECT * INTO CORRESPONDING FIELDS OF TABLE T_EORD
FROM EORD
WHERE MATNR IN S_MATNR
AND WERKS IN S_WERKS
AND EKORG IN S_EKORG
AND VDATU LE SY-DATUM
AND BDATU GE SY-DATUM
AND ( VRTYP EQ SPACE
OR VRTYP EQ C_K ).
IF SY-SUBRC NE 0 OR
T_EORD[] IS INITIAL.
MESSAGE S999(ZZ) WITH 'No data found for this selection'(S01).
ENDIF.
ENDFORM. " READ_MATERIAL_SOURCE_LIST
*eject
Form GET_PIR_INFORMATION
Process purchase info records --> purchase order history
FORM GET_PIR_INFORMATION.
SELECT INFNR
INTO EINA-INFNR
FROM EINA
WHERE LIFNR EQ T_EORD-LIFNR
AND MATNR EQ T_EORD-MATNR
AND MATKL IN S_MATKL
AND LOEKZ EQ SPACE.
SELECT SINGLE EFFPR PEINH WAERS
INTO CORRESPONDING FIELDS OF EINE
FROM EINE
WHERE INFNR EQ EINA-INFNR
AND EKORG EQ T_EORD-EKORG
AND ESOKZ EQ C_0
AND WERKS EQ T_EORD-WERKS
AND LOEKZ EQ SPACE.
CHECK SY-SUBRC EQ 0.
PERFORM READ_EIPA. "Read PO history
IF SY-SUBRC NE 0.
PERFORM FILL_MAT_PRICE USING ' ' EINA-INFNR
EINE-EFFPR EINE-PEINH EINE-WAERS.
APPEND MAT_PRICE.
ENDIF.
ENDSELECT.
ENDFORM. " GET_PIR_INFORMATION
*eject
Form GET_CONTRACT_INFORMATION
text
FORM GET_CONTRACT_INFORMATION.
SELECT SINGLE WAERS
INTO *EKKO-WAERS
FROM EKKO
WHERE EBELN EQ T_EORD-EBELN
AND LOEKZ EQ SPACE.
SELECT SINGLE EBELN EBELP EFFWR PEINH
KTMNG BPUMZ BPUMN
INTO CORRESPONDING FIELDS OF *EKPO
FROM EKPO
WHERE EBELN EQ T_EORD-EBELN
AND EBELP EQ T_EORD-EBELP
AND LOEKZ EQ SPACE.
CHECK SY-SUBRC EQ 0.
Get effective price in sales unit ...
IF *EKPO-KTMNG EQ 0 OR
*EKPO-BPUMN EQ 0.
W_EFFPR = *EKPO-EFFWR.
ELSE.
W_EFFPR = *EKPO-EFFWR / *EKPO-KTMNG
*EKPO-BPUMZ / *EKPO-BPUMN.
ENDIF.
PERFORM READ_EKAB.
IF SY-SUBRC NE 0.
PERFORM FILL_MAT_PRICE USING ' ' *EKPO-EBELN
W_EFFPR *EKPO-PEINH *EKKO-WAERS.
APPEND MAT_PRICE.
ENDIF.
ENDFORM. " GET_CONTRACT_INFORMATION
*eject
Form READ_EKAB
Read released document (PO's) of contract
FORM READ_EKAB.
SELECT EBELN EBELP BEDAT
INTO CORRESPONDING FIELDS OF EKAB
FROM EKAB
UP TO 1 ROWS
WHERE KONNR EQ T_EORD-EBELN
AND KTPNR EQ T_EORD-EBELP
AND WERKS EQ T_EORD-WERKS
AND EKORG EQ T_EORD-EKORG
AND BEDAT IN S_BEDAT
AND BSTYP EQ C_F
ORDER BY BEDAT DESCENDING.
PERFORM READ_ADDITIONAL_PO_DATA
USING EKAB-EBELN EKAB-EBELP.
CHECK SY-SUBRC EQ 0.
PERFORM FILL_MAT_PRICE USING 'X' T_EORD-EBELN
W_EFFPR *EKPO-PEINH *EKKO-WAERS.
APPEND MAT_PRICE.
ENDSELECT.
ENDFORM. " READ_EKAB -
Delete duplicate entriess from the internal table its urgent pls help.
Hi friends,
Hope everybody is doing good,Here is m query on delete duplicate data from the intenal table.
I have an internal table which contain data in the following format.
Doc No Comp Cod Vendor Assignment
1500000009 JM11 00000000
1500000008 JM11 20070212(Repeating)
1500000007 JM11 20070212
1500000006 JM11 00000000
1500000005 JM11 00000000
1500000004 JM11 00000000(Repeating)
1500000003 JM11 00000000 (Repeating)
1500000002 JM11 00000000
1500000001 JM11 20050302
1500000000 JM11 00000000
1500000003 JM11 10000088
1500000001 JM11 10000088
1500000030 JM11 10006260
1500000010 JM11 10006269
1500000008 JM11 10006269
1500000006 JM11 10006269
1500000004 JM11 10006269
if you see the document numbers,there are some document number which are repeating here,there are some document numer which contain vendor number but not the assignments,some of the document numbers contain the assignments but not the vendors.
If my internal table contain this kind of data with repeted document numbers than i want the document number which contains only the vendor number.
Pls help me with the appropriate logic,its urgent.
Thanks a lot
mrutyun^Hi,
<u><b>Deleting Adjacent Duplicate Entries</b></u>
To delete adjacent duplicate entries use the following statement:
DELETE ADJACENT DUPLICATE ENTRIES FROM <itab>
[COMPARING <f1> <f2> ...
|ALL FIELDS].
The system deletes all adjacent duplicate entries from the internal table <itab>. Entries are
duplicate if they fulfill one of the following compare criteria:
Without the COMPARING addition, the contents of the key fields of the table must be
identical in both lines.
If you use the addition COMPARING <f1> <f2> ... the contents of the specified fields <f1>
<f2> ... must be identical in both lines. You can also specify a field <fi> dynamically as
the contents of a field <ni> in the form (<ni>). If <ni> is empty when the statement is
executed, it is ignored. You can restrict the search to partial fields by
specifying offset and length.
If you use the addition COMPARING ALL FIELDS the contents of all fields of both lines
must be identical.
You can use this statement to delete all duplicate entries from an internal table if the table is
sorted by the specified compare criterion.
If at least one line is deleted, the system sets SY-SUBRC to 0, otherwise to 4.
Examples
DATA: BEGIN OF LINE,
COL1 TYPE I,
COL2 TYPE I,
END OF LINE.
DATA ITAB LIKE HASHED TABLE OF LINE WITH UNIQUE KEY COL1.
DO 4 TIMES.
LINE-COL1 = SY-INDEX.
LINE-COL2 = SY-INDEX ** 2.
INSERT LINE INTO TABLE ITAB.
ENDDO.
LINE-COL1 = 1.
DELETE TABLE ITAB: FROM LINE,
WITH TABLE KEY COL1 = 3.
LOOP AT ITAB INTO LINE.
WRITE: / LINE-COL1, LINE-COL2.
ENDLOOP.
The output is:
2 4
4 16
The program fills a hashed table with a list of square numbers. The DELETE
statement delete the lines from the table where the key field COL1 has the contents 1 or 3.
Regards,
Bhaskar -
Its urgent:plz tel me what is the steps move to produection oaf page.
Hi All,
I developed one oaf page.that page move to production.
i already move to produection but its not working fine.
its throw an error.
plz tell me what is the steps follow when move to production.
oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_NO_REGION_DATA. Tokens: REGIONCODE = /wnsgs/oracle/apps/ap/agingbuckets/webui/AgingBucketsPG;
at oracle.apps.fnd.framework.webui.JRAD2AKMapper.getRootMElement(JRAD2AKMapper.java:529)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getWebBeanTypeDataFromJRAD(OAWebBeanFactoryImpl.java:3719)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(OAWebBeanFactoryImpl.java:3452)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1005)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:508)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429)
at oa_html._OA._jspService(_OA.java:85)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
at oracle.jsp.JspServlet.service(JspServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
at oa_html._RF._jspService(_RF.java:102)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
at oracle.jsp.JspServlet.service(JspServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
at org.apache.jserv.JServConnection.run(JServConnection.java:294)
at java.lang.Thread.run(Thread.java:534)
## Detail 0 ##
Exception:
oracle.adf.mds.MetadataDefException: Unable to find component with absolute reference = /wnsgs/oracle/apps/ap/agingbuckets/webui/AgingBucketsPG, XML Path = null. Please verify that the reference is valid and the definition of the component exists either on the File System or in the MDS Repository.
at oracle.adf.mds.internal.MetadataManagerBase.findElement(MetadataManagerBase.java:1350)
at oracle.adf.mds.MElement.findElement(MElement.java:97)
at oracle.apps.fnd.framework.webui.JRAD2AKMapper.getRootMElement(JRAD2AKMapper.java:503)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getWebBeanTypeDataFromJRAD(OAWebBeanFactoryImpl.java:3719)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(OAWebBeanFactoryImpl.java:3452)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1005)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:508)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429)
at oa_html._OA._jspService(_OA.java:85)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
at oracle.jsp.JspServlet.service(JspServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
at oa_html._RF._jspService(_RF.java:102)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
at oracle.jsp.JspServlet.service(JspServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
at org.apache.jserv.JServConnection.run(JServConnection.java:294)
at java.lang.Thread.run(Thread.java:534)
Exception:
oracle.adf.mds.MetadataDefException: Unable to find component with absolute reference = /wnsgs/oracle/apps/ap/agingbuckets/webui/AgingBucketsPG, XML Path = null. Please verify that the reference is valid and the definition of the component exists either on the File System or in the MDS Repository.
at oracle.adf.mds.internal.MetadataManagerBase.findElement(MetadataManagerBase.java:1350)
at oracle.adf.mds.MElement.findElement(MElement.java:97)
at oracle.apps.fnd.framework.webui.JRAD2AKMapper.getRootMElement(JRAD2AKMapper.java:503)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getWebBeanTypeDataFromJRAD(OAWebBeanFactoryImpl.java:3719)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(OAWebBeanFactoryImpl.java:3452)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1005)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:508)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429)
at oa_html._OA._jspService(_OA.java:85)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
at oracle.jsp.JspServlet.service(JspServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
at oa_html._RF._jspService(_RF.java:102)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
at oracle.jsp.JspServlet.service(JspServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
at org.apache.jserv.JServConnection.run(JServConnection.java:294)
at java.lang.Thread.run(Thread.java:534)
thanks
Seshu.
Edited by: its urgent on Feb 8, 2012 2:31 AMDeployement steps:
1) Copy the Class files and move to into server
We can get class file >>F:\OAF\jdevhome\jdev\myclasses\imp
\myprojects
(imp) Load into server (java TOP) >>D:\oracle\viscomn\java\
2) Run the XML import Scripts in Command Prompt
F:\OAF\jdevbin\jdev\bin
For every Page and every Lov region
3) Next Go to apps
System administrator Create Function for a page
Description tab:
Function Name : IMP_STUDENT_REGISTRATION
User Function Name: Imp Student Registration
Description : Imp Student Registration
Properties Tab:
Type: SSWA JSP function
WebHTML Tab
Function:
HTML call: OA.jsp?page=/imp/oracle/apps/po/student/webui/ImpStudentResitrationPG
Note: DO the same for all the pages
4) Attach these Functions to Imp Student Operations menu to Imp Student Operations responsibility to User.
5) Bounce the apache.
Regards
Meher Irk -
PLZ ITS URGENT!!!!!!!!!!
hi i developed a smartforms......
in it i am using 'SSF_OPEN' and 'SSF_CLOSE' functions to suppress the print preview box which was coming again n again.....
firstly it was working properly bt i made some changes in my smartforms and then it started giving me the problem n giving the error after executing'Previous Output Request was not finished'...
plz help me out how to solve this problem....
PLZ ITS URGENT!!!!!!!!!!!!!!!!!
plz tell me anyone...........
Edited by: Pardeep Sharma on Dec 24, 2007 11:38 AM
Edited by: Pardeep Sharma on Dec 24, 2007 11:57 AM
Edited by: Pardeep Sharma on Dec 24, 2007 12:12 PMHi,
Is the requirement to supress the print preview or the dailog box containing the parameters for the print?
Regards,
Kk -
How to Fix the row in sap script, its urgent......
Hi Experts,
first i explain my sap script, i have print void check in my script client give readymade format means box are there, lines are there. i have to fix in box and line data form database table. everthing is working fine. i got all data. i have total 6 window in my script .but i have one issue In my sap script in header window total five rows... like below
Check voucher no:8888
check No: 1234
Date:1/28/2007
Bank:xyz
Batch no: 5678
now sometime check voucher is balnk....
Check voucher no: BLANK/NULL
check No: 1234
Date:1/28/2007
Bank:xyz
Batch no: 5678
because of that all rows are move up side and all window also move up side and so script not fix to the box and line all data are seen not perfectly... so guru`s how to fix the row and window in script....
its urgent...
Waiting for ur reply
Thanks & regards
JigarHi,
Follow the below steps . Definately your issue will bve resolved.
Let us suppose you are printing following fields
PH &v_text&
PH &v_text1&
PH &v_text2&
you will get the output as you expected.
and if you have any conditions for these fileds
/: if v_text is not initial.
PH &v_text&
/: endif
PH &v_text1&
PH &v_text2&
if you have data in each field then you will get output as expected .
But when v_text is initial.
the data will be moved up wnhich is happening in your case.
so what you need to do is?
/: if v_text is not initial.
PH &v_text&
/: else
PH (Here you need to mention empty line with same paragraph format
/: endif.
PH &v_text1&
PH &v_text2&
Reward points if useful
Regards,
Nageswar -
Hi All how to add new payscale for an employee in sap hr-abap,its urgent
Hi All ,
how to add new payscale for an employee in sap hr-abap,its urgent.
Message was edited by:
bharat kumar
Message was edited by:
bharat kumarHi
If that field which you wants to add is available in one of the structures like EKKO,EKPO then you can add that field just beside the other fields
If that field is not there in the any of the structures then you can define a variable using define command
/: DEFINE &VAR&
/ &VAR& = <some value>
or you can write subroutines to fetch the data from outside tables and can use those fields data in the script
<b>Reward points for useful Answers</b>
Regards
Anji -
Hi All,Please send me abap-hr material .Its urgent please.
Hi All,Please send me abap-hr material .Its urgent please.
These are the FAQ's that might helps you
http://www.sap-img.com/human/hr-faq.htm
http://www.sapgenie.com/faq/hr.htm
http://www.sapgenie.com/sapfunc/index.htm
http://www.sap-img.com/abap/sample-hr-reports-allocate-petrol-allowance.htm
http://www.sap-img.com/hr021.htm
http://www.sap-img.com/human/hr-faq.htm
http://www.sap-img.com/human/finding-the-list-of-hr-module-tables.htm
additional info......
Download the ABAP e-book for HR in the below link under the section 'Free ABAP eBook Download'
http://www.sap-img.com
Also have a look at the following links-
http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html
http://www.sapdevelopment.co.uk/hr/hrhome.htm
http://planetsap.com/index.htm
http://www.atomhr.com/library_full.htm
http://www.sap-basis-abap.com/saphr.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/60/d8d8c7576311d189270000e8322f96/frameset.htm
http://www.sapfriends.com/sapstuff.html
http://www.atomhr.com/know_preview/Reading_Payroll_Results_with_ABAP.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?track=NL-142&ad=500911#Payroll
http://www.sap-press.com/product.cfm?account=&product=H967
http://www.sapdevelopment.co.uk/hr/payres_abap.htm
http://www.sapdevelopment.co.uk/hr/payres_tcode.htm
http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
http://www.atomhr.com/training/Technical_Topics_in_HR.htm
http://www.planetsap.com/hr_abap_main_page.htm
you can see some Standard Program examples in this one..
http://www.sapdevelopment.co.uk/programs/programshr.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?Offer=SAlgwn12604#Certification -
Is it possible to export contacts from Outlook 2011 for Mac and importing this file back into Mac Address Book.? please reply me its urgent
Is it possible to export contacts from Outlook 2011 for Mac and importing this file back into Mac Address Book.? please reply me its urgent
-
Hi All requirement on Purchase Order.Its Urgent
Hi All,
Pls provide me the soure code for the following requirement ASAP. Its urgent.
Program: Z_PO_PRINT_MAIL
Transaction: ZPOP
Purchase order number: (should be a parameter not a select option) (Code the lookup using search help MEKK)
Radio button for: 1. Print Preview
2. Print
3. E-mail
Additional parameters based on above selection:
1. No additional parameters needed
2. Printer (code the F4 to search printers)(default users default printer)
3. E-mail address, cc (should also have same validations as e-mail address)
Description:
On pressing enter, use the Purchase order number to look up vendor number and name and display either to the right or below the purchase order number.
Vendor Number: EKPO-LIFNR
Vendor Name: LFA1-NAME1
1. Print Preview: Use function ME_DISPLAY_PURCHASE_DOCUMENT with 2 parameters only:
I_EBELN = PO Number
I_PREVIEW = X
2. Print: For this we have to do a BDC.Use transaction ME9F. Enter the purchase order number, blank out the rest. Select the first message, hit Message details. Enter a new message via Edit>new Entries. For new entries, you will need to enter NEU for Output type with Medium 1 (Print output). Hit enter. Select the message and click on further data. Set dispatch time to 4. Green arrow back. Select the message and click on Communication method. Enter the Logical destination as the printer, select Print Immediately and Release after output. Green arrow back and save.
3. E-mail: Use the following function modules:
ECP_PO_OTF_CREATE
CONVERT_OTF_2_PDF
SO_NEW_DOCUMENT_ATT_SEND_API1Hi,
You can explore following link for more details;
http://www.sap-basis-abap.com/sapmo017.htm
http://www.erpgenie.com/sap/sapfunc/purchasing.htm
Bye,
Muralidhara
Maybe you are looking for
-
I know this has something to do with INSERT key in Windows I guess. But suddenly I was using Mac OS X Lion and a keyboard sign appeared in the top bar, and the keyboard didnt work as it usually does. I mean, I wanted the long press key to write multi
-
On the use of VARCHAR2 vs. CHAR
I'm posting an e-mail thread that has been moving around in my organization, whith guidance from an Oracle representative. The basic issue concerns the use of CHAR vs. VARCHAR2 when defining a table in Oracle. I would like to get some comments from t
-
Is it ok to connect my nokia asha 501 to portable ...
is it ok to connect my nokia asha 501 to portable micro usb charger? Moderator's Note: the title of this is post has been changed as it is moved from an existing thread.
-
Xerces or JDOM which is better?
hi all i would like to ask for some opinions. Xerces and JDOM which is better? thanks!
-
So...we have Symantec DLP running. When a user sends an email that contains data blocked by a Symantec DLP policy they get an email from DLP saying their email was blocked. They also get an undeliverable from our Exchange environment saying ironpor