Updating an already created idoc
Dear All,
while creating an idoc i have filled only mandatory fields to create an idoc. but after the idoc is created, if i want to fill data in the remaining fields ie. i want to update an idoc then howsould i proceed??
is there any function module or bapi which will work for this?
waiting for your replies.
warm regards,
n.jain
Hai,
In this case u need to generate new idoc from the existing idoc by passing all the values.
In we19 give the idoc number and execute.Idoc with all segments will be displayed.
Here u can click the segment u need and enter the values.Again generate the idoc by any of the method standard inbound,inbound function module,inbound file,standard outbound processing according to whether u are doindg inbound or outbound.
This we19 transaction is used to test your idoc.suppose your creating your custom idoc type in that case we can check whether the idoc type is perfect or not.The idoc created by this transaction will get the status below.
we42 = idoc was created by test transaction
we74 = idoc was created by test transaction
Reward if useful,
S.Ramesh
Similar Messages
-
Updating price in already created sales order
Hi all,
I have an issue. When we create sales order, system will display current date pricing on sales order, for example total value of sales order is 9000. Now before delivery, prices change and we have to manually update price on sales order individually. Is there any report available that can update price of all already created sales orders instead of going on sales order and update one by one.
Please respond.
Best Regards,
AI.Hello,
You can update the pricing for all the created orders at a time in VA05 .
Goto Transaction code VA05 and give all the sales orders and then in the MENU click on
EDIT->MASS CHANGE>NEW PRICING
And update the New pricing, then will carry out new pricing for all the sales orders at a time.
OR,
There is also one function module SD_BULK_CHANGE , Create your own Query in SQV1 and make changes.
Hope it will resolve , Please revert if you need further details
thanks,
santosh -
my sister inlaw gave me her iphone3 and when i try to update a app it says that i must sign into her accound when i have already created my own apple id n put it in, how can i avoid that from happening/ change it?
You should do this to make this your iPhone and remove her info...
If desired, move photos/videos off the Camera Roll: http://support.apple.com/kb/HT4083
If desired, backup the device to iTunes or iCloud: http://support.apple.com/kb/ht1766
Then, on the device...
Settings > Messages > iMessage > Off
Settings > FaceTime > Off
Settings > iCloud > (scroll down) Delete Accout (this only unregisters and deletes it off the device)
Settings > iTunes & App stores. Tap the AppleID and sign out.
Settings > General > Reset > Erase All Content and Settings
Unregister the device at https://supportprofile.apple.com
More Info... http://support.apple.com/kb/HT5661 -
Hi all,
I have a requirement where i have to send an SD IDOC from one sap to another sap system using EDI. Could you tell me what are the settings and configurations i would have to do (like setting up partner profile etc) for sending it successfully.
Any pointers would be highly appreciated.
Thanks in advance.
Regards,
JoseHi Jose,
You may use the Following for IDOC.
SEND DATA THROUGH ALE-IDOC
We will create data in 100 client and send to 200 client. So out sender system is 100
client and receiver system is 200 client. So create tables and records in 100 client and we
will send these data to 200 client.
NOTE Here we are not using SAP standard Message type. So we have to create each and
every things, like tables, segments, basic idoc, message type, function module,
executable program, but when we will send through SAP standard message type, we dont
need to create all above things.
1. CREATE TABLES
1. ZCUSTHEAD Customer master
a. mandt - client
b. kunnr customer no(PK)
c. name1 name of customer
d. add1 address
e. regio country
2. ZSALHEAD
a. mandt client
b. vbeln sales document (PK)
c. kunnr cust no (FK of ZCUSTHEAD)
3. ZSALITEM
a. mandt client
b. vbeln sales doc no. (FK of ZSALHEAD AND PK)
c. posnr item no. (PK)
d. matnr material no.
e. netwr value of material
f. zmeng quantity of material
2. CREATE RECORDS
Create records in above tables. Go to SE16, give table name and click on create icon
to create records.
(Signature invalid, data error) Signed by kinnari Time: 2002.11.14 16:02:59 +05'30' Reason: <none> Location:
(Signature invalid, data error) Signed by kinnari Time: 2003.01.03 09:39:41 +05'30' Reason: <none> Location:
(Signature invalid, data error) Signed by kinnari Time: 2003.01.03 09:38:46 +05'30' Reason: <none> Location:
STEPS OF SENDING DATA THROUGH IDOC
A. Create a basic Idoc type.
B. An Outbound (Selection) program for generating Idocs
C. ALE Configuration in sending System
D. An Inbound (Posting) program for Posting Idocs
E. Settings in receiving system
F. Send and Receiving Idoc.
OUTBOUND PROCESS
A. Create a basic Idoc type
1. To create Basic Idoc Type first we have to create segment.
To create Segments go to WE31
2. Give segment name as Z1SEGMENT1
(CREATE ICON)
3. Click on CREATE Icon.
4. It shows you above screen.
5. Just give field names and data element for this field, Be sure that the data element should be
the same which you have given in table.
6. Give all the fields of ZCUSTHEAD table.
7. After defining it, save it as request.
NOTE : You can save it as local object but , if you save it as local object you have to define all
segments again in receiving system. So create it as request and transport it.
8. After saving Segment release it. Write segment name in segment type field (we31).
Go to Edit in Menu bar, Set Release. It will add in Definitios, and will take 46C as Release.
9. Create Z1SEGMENT2 same as Z1SEGMENT1 for ZSALHEAD table and Z1SEGMENT3 for
ZSALITEM table.
Release them same as Z1SEGMENT1.
10. Creating Basic Idoc Type goto WE31.
11. Type name of Basic Idoc Type as ZSALIDOC in obj. name field.
12. Choose Basic type Development object.
13. Click on Create Icon.
14. It will jump you to below screen.
15. Select Create new and enter description in Description field.
16. Press enter.
17. It jumps to below screen.
18. And if you click on Create Icon, It will pop up Maintain Attributes window.
19. In this pop up window write segment name Z1SEGMENT1, click it as mandatory segment. Min
no 1 and max no 10. Press enter.
20. Same way attach Z1SEGMENT2 as child level.
And give same attributes like Z1SEGMENT1. But dont give as mandatory segment.
21. Same way attach Z1SEGMENT3 as child level of Z1SEGMENT2. Give segm type Z1SEGMENT3,
dont give mandatory seg. , min no 1 and max no 50. Press enter.
22. It looks like now below picture.
23. Save it and press F3 to go back. And release this Idoc also. Write Idoc name in Obj.
field(we30).
Go to Edit and Set Release.
24. To Create Message Type go to WE81. Click on Change Icon, from App. bar.
25. Displays below screen, Click on New entries.
(New entries)
26. Jump you to next screen. Give Message Type ZSALMES and description. Save it or create
request for it.
27. Idoc is attached with Segments and now attach Idoc with message type.
28. To attach it go to WE82. Click on change icon.
29. Click on New entries.
(New entries)
30. Write Message type ZSALMES , Basic type ZSALIDOC and Release 46C(version of your basis
component).
31. Save it or create request of it.
32. Now send your request in 1 shot in your receiving system(200 client). So you dont need to
create all Segments, Basic idoc type and message type in another client.
B. An Outbound (Selection or Executable) program for generating Idocs
1. Write an executable program in SE38.
2. Give Program name ZKIN_SALES_IDOC, and create it.
Coding of this report is given at the end of the document.
3. Provide the selection screen for
i. Key for Application Document.
- Select option for Customer Number
- Select option for Sales document Number
ii. Message type
- Parameter for Message Type (EDIDC-MESTYP)
iii. Logical system name (Destination System)
-Parameter for Logical System name (EDIDC-RCVPRT)
iv. Destination(Receiving) System
- Parameters for Destination system (EDIDC-RCVPRN)
Note : Code of program is given at the end of document.
C. ALE Configuration in sending System
1. SET GLOBAL PARAMETERS
1. To set global parameters in sending system go to WE46.
2. Click on Change icon
3. Select the recipient type for the user (The user to be notified when an
IDOC error occurs.)
4. Select the identification of the user as user id.
5. Enter maximum numbers of syntax errors
6. Click on Save.
7. But once you have configured it, dont need to do it again.
2. COMMUNICATION SETTINGS
NOTE Consult your BASIS ADMIN to do these settings.
Go to T-Code SALE.
1. Maintain logical system
1. Click on the node Sending and receiving system
2. Click on Logical system node
3. Double click on Define logical system.
4. It will display below screen.
5. Click on New Entries.
6. Enter Logical System and its name
7. Click on Save
2. Assigning Client to the Logical System
1. Click on the node Sending and receiving system. (SALE)
2. Click on Logical system node
3. Double click on Assign client to the logical system.
4. It shows below screen.
5. Click on New Entries.
6. Enter the values of client for Logical system
7. Click on Save.
3. Setting RFC destination
1. Go to SM59.
(Double click on 200 client)
2. Click on Create
3. Enter Value for RFC Destination . It is advised to give the logical name of the
remote system.
4. Select Connection type - 3-R/3 connection
5. Target host , Enter the system number, Description , User Id, Client, Password,
Language.
6. Click on Save and Test the connection.
7. Create RFC destination for Each remote system.
8. But if your receiving system is already created, and if you find it in your connect
type so just double click on it.
9. Here double click on our receiving system which is 200 client.
10. Every fields are already filled up.
11. Just click on Remote Logon, and test , does it log in as 200 client.
12. If yes means it works properly.
4. Port definition
1. To define port go to WE21.
2. Select Transactional RFC node
3. Click on Create and Generate Port number Automatically
4. Enter Short Text and RFC Destination
5. Click on Save
6. If port for 200 is already Generated then dont need to create it again.
5. Maintain Customer Model
1. To maintain customer model go to BD64.
2. Click on Change .
3. Click on Create Model view.
4. Enter the Short Text and Technical Name for the Model View
5. Click Continue
6. Select the Model view created and click on Add Message type.
7. Select the Logical name for sender and receiver.
8. Type message type ZSALMES.
9. Click on Continue and Save.
6. Generating Partner Profile
1. Select the Model View CUST MODEL FOR SALES in BD64. (Either go to BD82.)
2. Go to Environment in menu bar and click on Generate partner profiles.
3. In the next screen enter partner system name 200.
4. Execute it.
5. It will display below screen. And shows your message type as outbound
parameters.
(Shows message type)
6. To check your profile is generated or not, go to WE20.
7. Open partner type LS, double click on receiving system number (200).
8. You can check in outbound parameters table that ZSALMESS is already added there.
7. Distributing the Customer Model
1. To distribute customer model again go to BD64.
2. Select the Model View
3. Go to Edit -> Model View -> Distribute.
4. It opens Distribute Model View window, click continue.
INBOUND PROCESS
Inbound process has been done in receiving system. In our scenario we will do in 200
client.
D. An Inbound (Posting) program for Posting IDOCS
1. The posting program is Function Module.
2. Create a function module in SE37 for your posting program.
Include in the source code include type MBDCONWF .
3. Maintain the naming convention of the function module as
Z_IDOC_INPUT_<MESSAGE TYPE>
So, we will create function module with the name,
Z_IDOC_INPUT_ZSELMES
Note : Code of FUNCTION MODULE is given at the end of document.
E. Settings in receiving system
Note : The basic IDOC type, Message type should be transported from the sending system
to the receiving system else create the same in the sending system also.
This is not necessary for SAP Standard message type.
1. Basic Settings for Global parameters
2. Communication Settings
3. Generate Partner Profile
(Follow the same procedure as described in Sending System)
4. Allocate the Function Module (Posting Program) to logical message
1. To allocate function module go to WE57.
2. Click on change icon, click on New entries.
3. Enter the Function Module name, Type F, Basic Type as Basic IDOC type and
Message type. give Direction as 2.
4. Save it. Go back and again save it.
5. Check your function module is there is the list of allocated function modules.
5. Define the settings for inbound function mode
1. To define input method for function module, go to BD51.
2. Click on New entries.
3. Give Function module name Z_IDOC_INPUT_ZSALMES.
4. Give Input method as value 2.
5. Save it. Go back. Again save it.
6. Create a process code
1. To create process code, go to WE42.
2. Click on change icon.
3. Click on New Entries.
4. Write Process code name ZPCSAL in process code.
5. Give description.
6. Select Processing type as Processing by function module.
7. Now give function module name and click on save button.
8. It will jump you to below screen.
9. Select your function module from function module list.
10. Save it.
11. Now double click on Logical message. It will jump you to screen.
12. In the Assignment of logical message, give Message type name ZSALMES.
13. Click on Save
F. Send Idoc
1. Go to sender system(100 Client), run ZKIN_SALES_IDOC (selection program). Give
Proper value in parameters. If it shows message IDOC GENERATED NO XXXXXXX .
Means your IDOC has been and sent to receiving system.
It shows message like below. Note this No.
2. Go to BD75 and just press F8, it will show you that 1 IDOC has been sent.
3. Go to WE19, give No. of your IDOC generated in first IDOC no field, press F8.
4. It will show you below screen.
5. Click on standard outbound processing tab and again press enter, it will show
you IDOC sent through tRFC.
6. It shows all records in segments, in above figure.
7. Go to WE02 T-Code. Press F8 and check your IDOC has been sent or not, if your
IDOC shows red light, so there is some error. If you get yellow light so there is
some warning and if you get green light means your IDOC has been sent.
Otherwise, it will give you status 12 and green light , that your idoc has been
dispached ok.
8. Receive Idoc
1. Go to receiving system (200), go to WE02 T-Code and check your IDOC is there
or not. Again the same status for for this IDOCs. Green for successfully received,
yellow for warning and red shows error.
2. If it shows error click on status it displays what error is there. Read it and solve
it.
3. Or it it shows green light means, your data has been saved in your database.
Go to SE11 and check new records are there?
EXECUTABLE / SELECTION PROGRAM (SENDING SYSTEM)
1. Go to SE38 and create program with name ZKIN_SALES_IDOC.
2. Create an executable program.
3. Code.
REPORT ZKIN_SALES_IDOC MESSAGE-ID YM.
PURPOSE OF REPORT *
Generating an Idoc through this report for Customer Master, Sales *
Master and Sales item table. *
This Idoc contains all data of these three tables *
Start of Program *
************************TABLE-DECLARATION****************************
TABLES : ZCUSTHEAD, "Cutomer Header
ZSALHEAD, "Sales Header
ZSALITEM. "Sales Item
************************STRUCTURE-DECLARATION************************
DATA : S_CONTROL_RECORD LIKE EDIDC, "Idoc Control Record
S_Z1SEGMENT1 LIKE Z1SEGMENT1, "CUSTOMER Header Data
S_Z1SEGMENT2 LIKE Z1SEGMENT2, "SALES HEADER Data
S_Z1SEGMENT3 LIKE Z1SEGMENT3. "SALES Detail Data
**********************ITAB-DECLARATION*******************************
DATA : T_ZCUSTHEAD LIKE ZCUSTHEAD OCCURS 0 WITH HEADER LINE.
DATA : T_ZSALHEAD LIKE ZSALHEAD OCCURS 0 WITH HEADER LINE.
DATA : T_ZSALITEM LIKE ZSALITEM OCCURS 0 WITH HEADER LINE.
DATA : T_EDIDD LIKE EDIDD OCCURS 0 WITH HEADER LINE.
"Data Records
DATA : T_COMM_IDOC LIKE EDIDC OCCURS 0 WITH HEADER LINE.
"Generated Communication IDOc
*********************VARIABLE-DECLARATION****************************
---------> Segment Name <----------
CONSTANTS :
C_Z1SEGMENT1 LIKE EDIDD-SEGNAM VALUE 'Z1SEGMENT1',
C_Z1SEGMENT2 LIKE EDIDD-SEGNAM VALUE 'Z1SEGMENT2',
C_Z1SEGMENT3 LIKE EDIDD-SEGNAM VALUE 'Z1SEGMENT3'.
---------> Idoc Type <----------
CONSTANTS: C_ZMINTEST_IDOC_TYPE LIKE EDIDC-IDOCTP VALUE 'ZSALIDOC'.
***************************INPUT-FIELDS******************************
SELECT-OPTIONS : S_KUNNR for zcusthead-kunnr,
S_VBELN for zsalhead-vbeln.
PARAMETERS :
C_MESTYP LIKE EDIDC-MESTYP DEFAULT 'ZSALMES',
"Message Type ( zemp )
C_RCVPRT LIKE EDIDC-RCVPRT DEFAULT 'LS',
"Partner type of receiver
C_LOGSYS LIKE EDIDC-RCVPRN DEFAULT '200'.
"Destination System
************************START-OF-SELECTION****************************
START-OF-SELECTION.
PERFORM FETCH_CUSTHEADER.
PERFORM FETCH_SALESHEADER.
PERFORM FETCH_SALESITEM.
PERFORM CONTROL_REC.
PERFORM MASTER_IDOC_DISTRIBUTE.
END-OF-SELECTION.
FORMS-OF-ALL-PERFORMS *
--FETCH_CUSTHEADER--
FORM FETCH_CUSTHEADER.
SELECT *
FROM ZCUSTHEAD
INTO TABLE T_ZCUSTHEAD
WHERE KUNNR IN S_KUNNR.
IF SY-SUBRC NE 0.
MESSAGE I000.
ENDIF.
LOOP AT T_ZCUSTHEAD.
S_Z1SEGMENT1-KUNNR = T_ZCUSTHEAD-KUNNR.
S_Z1SEGMENT1-NAME1 = T_ZCUSTHEAD-NAME1.
S_Z1SEGMENT1-ADD1 = T_ZCUSTHEAD-ADD1.
S_Z1SEGMENT1-REGIO = T_ZCUSTHEAD-REGIO.
T_EDIDD-SEGNAM = C_Z1SEGMENT1.
T_EDIDD-SDATA = S_Z1SEGMENT1.
APPEND T_EDIDD.
CLEAR T_EDIDD.
ENDLOOP.
ENDFORM. " FETCH_CUSTHEADER
--FETCH_SALESHEADER--
FORM FETCH_SALESHEADER.
SELECT *
FROM ZSALHEAD
INTO TABLE T_ZSALHEAD
WHERE VBELN IN S_VBELN.
IF SY-SUBRC NE 0.
MESSAGE I001.
ENDIF.
LOOP AT T_ZSALHEAD.
S_Z1SEGMENT2-VBELN = T_ZSALHEAD-VBELN.
S_Z1SEGMENT2-KUNNR = T_ZSALHEAD-KUNNR.
T_EDIDD-SEGNAM = C_Z1SEGMENT2.
T_EDIDD-SDATA = S_Z1SEGMENT2.
APPEND T_EDIDD.
CLEAR T_EDIDD.
ENDLOOP.
ENDFORM. " FETCH_SALESHEADER
--FETCH_SALESITEM--
FORM FETCH_SALESITEM.
SELECT *
FROM ZSALITEM
INTO TABLE T_ZSALITEM
WHERE VBELN IN S_VBELN.
IF SY-SUBRC NE 0.
MESSAGE I001.
ENDIF.
LOOP AT T_ZSALITEM.
S_Z1SEGMENT3-VBELN = T_ZSALITEM-VBELN.
S_Z1SEGMENT3-POSNR = T_ZSALITEM-POSNR.
S_Z1SEGMENT3-MATNR = T_ZSALITEM-MATNR.
S_Z1SEGMENT3-ZMENG = T_ZSALITEM-ZMENG.
S_Z1SEGMENT3-NETWR = T_ZSALITEM-NETWR.
T_EDIDD-SEGNAM = C_Z1SEGMENT3.
T_EDIDD-SDATA = S_Z1SEGMENT3.
APPEND T_EDIDD.
CLEAR T_EDIDD.
ENDLOOP.
ENDFORM. " FETCH_SALESITEM
--CONTROL_REC--
FORM CONTROL_REC.
*--> Control Record Of IDOC <--
S_CONTROL_RECORD-MESTYP = C_MESTYP. "Message type
S_CONTROL_RECORD-IDOCTP = C_ZMINTEST_IDOC_TYPE. "Basic IDOC type
S_CONTROL_RECORD-RCVPRT = C_RCVPRT. "Partner type of receiver
S_CONTROL_RECORD-RCVPRN = C_LOGSYS. "Partner number of receiver
ENDFORM. " CONTROL_REC
-- MASTER_IDOC_DISTRIBUTE--
FORM MASTER_IDOC_DISTRIBUTE.
*--> Pass Control To The ALE Layer <--
(Application Interface To the ALE Layer On Outbound Processing Side )
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
MASTER_IDOC_CONTROL = S_CONTROL_RECORD
TABLES
COMMUNICATION_IDOC_CONTROL = T_COMM_IDOC
MASTER_IDOC_DATA = T_EDIDD
EXCEPTIONS
ERROR_IN_IDOC_CONTROL = 1
ERROR_WRITING_IDOC_STATUS = 2
ERROR_IN_IDOC_DATA = 3
SENDING_LOGICAL_SYSTEM_UNKNOWN = 4
OTHERS = 5
IF SY-SUBRC NE 0.
MESSAGE I002.
ELSE.
LOOP AT T_COMM_IDOC.
WRITE:/ 'IDOC Generated : No ', T_COMM_IDOC-DOCNUM.
ENDLOOP.
ENDIF.
ENDFORM. " MASTER_IDOC_DISTRIBUTE
POSTING PROGRAM / FUNCTION MODULE (RECEIVING SYSTEM)
1. Create function module in receiving system.
2. Go to SE37 create function module named, Z_IDOC_INPUT_ZSALMES.
3. Change ATTRIBUTES, in process type make it Remote Function Call.
4. Make changes in IMPORT, and add parameters.
Parameter Type Type Spec. Reference Type Pass Value
INPUT_METHOD LIKE BDWFAP_PARINPUTMETHD
v
MASS_PROCESSING LIKE BDWFAP_PARMASS_PROC
v
5. Make changes in EXPORT, and add parameters.
Parameter Type Type Spec. Reference Type Pass Value
WORKFLOW_RESULT LIKE BDWF_PARAMRESULT
v
APPLICATION_VARIABLE LIKE BDWF_PARAMAPPL_VAR
v
IN_UPDATE_TASK LIKE BDWFAP_PARUPDATETASK
v
CALL_TRANSACTION_DONE LIKE BDWFAP_PARCALLTRANS
v
6. Make changes in Tables.
Parameter Type Type Spec. Reference Type Pass Value
IDOC_CONTRL LIKE EDIDC v
IDOC_DATA LIKE EDIDD v
IDOC_STATUS LIKE BDIDOCSTAT v
RETURN_VARIABLES LIKE BDWFRETVAR v
SERIALIZATION_INFO LIKE BDI_SER v
7. Make changes in Exception
Exception Short text
WRONG_FUNCTION_CALLED
8. Source Code
FUNCTION Z_IDOC_INPUT_ZSALMES.
""Local interface:
*" IMPORTING
*" VALUE(INPUT_METHOD) LIKE BDWFAP_PAR-INPUTMETHD
*" VALUE(MASS_PROCESSING) LIKE BDWFAP_PAR-MASS_PROC
*" EXPORTING
*" VALUE(WORKFLOW_RESULT) LIKE BDWF_PARAM-RESULT
*" VALUE(APPLICATION_VARIABLE) LIKE BDWF_PARAM-APPL_VAR
*" VALUE(IN_UPDATE_TASK) LIKE BDWFAP_PAR-UPDATETASK
*" VALUE(CALL_TRANSACTION_DONE) LIKE BDWFAP_PAR-CALLTRANS
*" TABLES
*" IDOC_CONTRL STRUCTURE EDIDC
*" IDOC_DATA STRUCTURE EDIDD
*" IDOC_STATUS STRUCTURE BDIDOCSTAT
*" RETURN_VARIABLES STRUCTURE BDWFRETVAR
*" SERIALIZATION_INFO STRUCTURE BDI_SER
*" EXCEPTIONS
*" WRONG_FUNCTION_CALLED
*FUNCTION Z_IDOC_INPUT_ZMATER .
Author : *
Include File that contains ALE constants
INCLUDE MBDCONWF.
DATABASE TABLE
TABLES : ZCUSTHEAD,
ZSALHEAD,
ZSALITEM.
DATA DECLARATION
*--> Structure <--
DATA : W_SEGNAM1 LIKE Z1SEGMENT1,
W_SEGNAM2 LIKE Z1SEGMENT2,
W_SEGNAM3 LIKE Z1SEGMENT3.
*--> Internal Table <--
DATA : T_ZCUSTHEAD LIKE ZCUSTHEAD OCCURS 0 WITH HEADER LINE.
DATA : T_ZSALHEAD LIKE ZSALHEAD OCCURS 0 WITH HEADER LINE.
DATA : T_ZSALITEM LIKE ZSALITEM OCCURS 0 WITH HEADER LINE.
PROGRAM LOGIC
*--> Initialize Work Flow Result<--
WORKFLOW_RESULT = C_WF_RESULT_OK.
LOOP AT IDOC_CONTRL.
IF IDOC_CONTRL-MESTYP NE 'ZSALMES'.
RAISE WRONG_FUNCTION_CALLED.
ENDIF.
*Before reading a new employee clear application buffer
LOOP AT IDOC_DATA WHERE DOCNUM EQ IDOC_CONTRL-DOCNUM.
CASE IDOC_DATA-SEGNAM.
WHEN 'Z1SEGMENT1'.
W_SEGNAM1 = IDOC_DATA-SDATA.
MOVE-CORRESPONDING W_SEGNAM1 TO T_ZCUSTHEAD.
INSERT INTO ZCUSTHEAD VALUES T_ZCUSTHEAD.
WHEN 'Z1SEGMENT2'.
W_SEGNAM2 = IDOC_DATA-SDATA.
MOVE-CORRESPONDING W_SEGNAM2 TO T_ZSALHEAD.
INSERT INTO ZSALHEAD VALUES T_ZSALHEAD.
WHEN 'Z1SEGMENT3'.
W_SEGNAM3 = IDOC_DATA-SDATA.
MOVE-CORRESPONDING W_SEGNAM3 TO T_ZSALITEM.
INSERT INTO ZSALITEM VALUES T_ZSALITEM.
ENDCASE.
ENDLOOP.
CUSTOMER HEADER *
SELECT *
FROM ZCUSTHEAD.
ENDSELECT.
IF SY-SUBRC NE 0.
INSERT INTO ZCUSTHEAD VALUES T_ZCUSTHEAD.
ELSE.
UPDATE ZCUSTHEAD FROM T_ZCUSTHEAD.
ENDIF.
IF SY-SUBRC EQ 0.
IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
IDOC_STATUS-STATUS = '53'.
IDOC_STATUS-MSGTY = 'I'.
IDOC_STATUS-MSGID = 'YM'.
IDOC_STATUS-MSGNO = '004'.
IDOC_STATUS-MSGV1 = T_ZCUSTHEAD-KUNNR.
APPEND IDOC_STATUS.
CLEAR IDOC_STATUS.
ELSE.
IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
IDOC_STATUS-STATUS = '51'.
IDOC_STATUS-MSGTY = 'E'.
IDOC_STATUS-MSGID = 'YM'.
IDOC_STATUS-MSGNO = '005'.
IDOC_STATUS-MSGV1 = T_ZCUSTHEAD-KUNNR.
APPEND IDOC_STATUS.
CLEAR IDOC_STATUS.
WORKFLOW_RESULT = C_WF_RESULT_ERROR.
RETURN_VARIABLES-WF_PARAM = 'Error_Idocs'.
RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
APPEND RETURN_VARIABLES.
CLEAR RETURN_VARIABLES.
ENDIF.
SALES HEADER *
SELECT *
FROM ZSALHEAD.
ENDSELECT.
IF SY-SUBRC NE 0.
INSERT INTO ZSALHEAD VALUES T_ZSALHEAD.
ELSE.
UPDATE ZSALHEAD FROM T_ZSALHEAD.
ENDIF.
IF SY-SUBRC EQ 0.
IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
IDOC_STATUS-STATUS = '53'.
IDOC_STATUS-MSGTY = 'I'.
IDOC_STATUS-MSGID = 'YM'.
IDOC_STATUS-MSGNO = '004'.
IDOC_STATUS-MSGV1 = T_ZSALHEAD-VBELN.
APPEND IDOC_STATUS.
CLEAR IDOC_STATUS.
ELSE.
IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
IDOC_STATUS-STATUS = '51'.
IDOC_STATUS-MSGTY = 'E'.
IDOC_STATUS-MSGID = 'YM'.
IDOC_STATUS-MSGNO = '005'.
IDOC_STATUS-MSGV1 = T_ZSALHEAD-VBELN.
APPEND IDOC_STATUS.
CLEAR IDOC_STATUS.
WORKFLOW_RESULT = C_WF_RESULT_ERROR.
RETURN_VARIABLES-WF_PARAM = 'Error_Idocs'.
RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
APPEND RETURN_VARIABLES.
CLEAR RETURN_VARIABLES.
ENDIF.
SALES ITEM *
SELECT *
FROM ZSALITEM.
ENDSELECT.
IF SY-SUBRC NE 0.
INSERT INTO ZSALITEM VALUES T_ZSALITEM.
ELSE.
UPDATE ZSALITEM FROM T_ZSALITEM.
ENDIF.
IF SY-SUBRC EQ 0.
IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
IDOC_STATUS-STATUS = '53'.
IDOC_STATUS-MSGTY = 'I'.
IDOC_STATUS-MSGID = 'YM'.
IDOC_STATUS-MSGNO = '004'.
IDOC_STATUS-MSGV1 = T_ZSALITEM-VBELN.
APPEND IDOC_STATUS.
CLEAR IDOC_STATUS.
ELSE.
IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
IDOC_STATUS-STATUS = '51'.
IDOC_STATUS-MSGTY = 'E'.
IDOC_STATUS-MSGID = 'YM'.
IDOC_STATUS-MSGNO = '005'.
IDOC_STATUS-MSGV1 = T_ZSALITEM-VBELN.
APPEND IDOC_STATUS.
CLEAR IDOC_STATUS.
WORKFLOW_RESULT = C_WF_RESULT_ERROR.
RETURN_VARIABLES-WF_PARAM = 'Error_Idocs'.
RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
APPEND RETURN_VARIABLES.
CLEAR RETURN_VARIABLES.
ENDIF.
ENDLOOP.
ENDFUNCTION. " IDOC_STATUS_INPUT_ZEMP -
Convert an already created pdf to otf
i made an report that takes some pdf from sapscript and takes the otf's and send them as email attachement.
Now i want to incude one more pdf to the same email that is already created and i store it to my fileserver . How can i do this ?
REPORT YDP_SEND_ALL_DOCS_EMAIL.
DATA: ITCPO LIKE ITCPO,
TAB_LINES LIKE SY-TABIX.
Variables for EMAIL functionality
DATA: MAILDATA LIKE SODOCCHGI1.
DATA: MAILPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
DATA: MAILHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
DATA: MAILBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: MAILTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: MAILREC LIKE SOMLREC90 OCCURS 0 WITH HEADER LINE.
DATA: SOLISTI1 LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
TABLES: LIPS,
LIKP,
LFA1,
KNA1,
ADR6,
VBKD,
VBPA,
VBAK,
VBRK,
VBRP,
MARA,
T005T,
VBFA.
DATA : BEGIN OF ITAB OCCURS 0,
VBELN LIKE VBRK-VBELN, "billing doc
NAME1 LIKE KNA1-NAME1, "Customer name
SMTP_ADDR LIKE ADR6-SMTP_ADDR,
END OF ITAB.
DATA: MY_OPTIONS TYPE ITCPO.
SELECTION-SCREEN BEGIN OF BLOCK B0 WITH FRAME TITLE TEXT-001.
PARAMETERS: SVBELN TYPE VBRK-VBELN.
PARAMETERS: SNAME TYPE KNA1-NAME1.
PARAMETERS: S_EMAIL TYPE ADR6-SMTP_ADDR.
SELECTION-SCREEN SKIP 2.
PARAMETERS: SUBJ(30) TYPE C.
SELECTION-SCREEN SKIP 2.
PARAMETERS: LINE1 LIKE MAILTXT-LINE.
PARAMETERS: LINE2 LIKE MAILTXT-LINE.
PARAMETERS: LINE3 LIKE MAILTXT-LINE.
PARAMETERS: LINE4 LIKE MAILTXT-LINE.
PARAMETERS: LINE5 LIKE MAILTXT-LINE.
PARAMETERS: LINE6 LIKE MAILTXT-LINE DEFAULT 'The following PDF are produced by SAP and are digitally signed .'.
SELECTION-SCREEN END OF BLOCK B0.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-002.
PARAMETERS: YHSD AS CHECKBOX DEFAULT 'X'.
PARAMETERS: ZHAG AS CHECKBOX DEFAULT 'X'.
PARAMETERS: ZPHL AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK B1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME = 'S_EMAIL'.
SCREEN-INPUT = 0.
SCREEN-INTENSIFIED = 0.
MODIFY SCREEN.
EXIT.
ENDIF.
ENDLOOP.
LOOP AT SCREEN.
IF SCREEN-NAME = 'SNAME'.
SCREEN-INPUT = 0.
SCREEN-INTENSIFIED = 0.
MODIFY SCREEN.
EXIT.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN.
SELECT SINGLE * FROM VBRK WHERE VBELN = SVBELN.
IF SY-SUBRC = 0.
SELECT SINGLE * FROM KNA1 WHERE KUNNR = VBRK-KUNRG.
SNAME = KNA1-NAME1.
SELECT SINGLE * FROM ADR6 WHERE ADDRNUMBER = KNA1-ADRNR.
IF SY-SUBRC = 0 .
S_EMAIL = ADR6-SMTP_ADDR.
ELSE.
S_EMAIL = 'No Email Address !!!!'.
ENDIF.
ELSE.
S_EMAIL = 'No Email Address !!!!'.
ENDIF.
START-OF-SELECTION.
PERFORM SEND_FORM_VIA_EMAIL.
*& Form WRITE_FORM
text
-->P_WIN text
-->P_TYPE text
-->P_EL text
-->P_FUN text
FORM WRITE_FORM USING P_WIN P_TYPE P_EL P_FUN.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = P_EL
FUNCTION = P_FUN
TYPE = P_TYPE
WINDOW = P_WIN
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
CODEPAGE = 9
OTHERS = 10.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "WRITE_FORM
*& Form CLOSE_FORM
text
FORM CLOSE_FORM.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = ITCPP
RDI_RESULT =
TABLES
OTFDATA = OTF
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
OTHERS = 4.
ENDFORM. " CLOSE_LAYOUT_DSS
*& Form GET_DATA
text
FORM GET_DATA.
DATA: BEGIN OF OTF OCCURS 0.
INCLUDE STRUCTURE ITCOO .
DATA: END OF OTF.
DATA: ITCPO LIKE ITCPO.
DATA: ITCPP LIKE ITCPP.
CLEAR ITCPO.
ITCPO-TDGETOTF = 'X'.
PERFORM COLLECT_DATA(YHAL_SHIPPING_DETAILS) USING SVBELN."VBRK-VBELN.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = 'YHAL_SHIP_DETAIL'
LANGUAGE = SY-LANGU
OPTIONS = ITCPO
DIALOG = ' '
EXCEPTIONS
OTHERS = 1.
PERFORM DISPLAY_DATA(YHAL_SHIPPING_DETAILS) USING SVBELN." VBRK-VBELN.
Close up Form and get OTF code
CALL FUNCTION 'END_FORM'
EXCEPTIONS
ERROR_MESSAGE = 01
OTHERS = 02.
MOVE-CORRESPONDING ITCPO TO ITCPP.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = ITCPP
TABLES
OTFDATA = OTF
EXCEPTIONS
OTHERS = 1.
Move OTF code to structure SOLI form email
CLEAR SOLISTI1. REFRESH SOLISTI1.
LOOP AT OTF.
SOLISTI1-LINE = OTF.
APPEND SOLISTI1.
ENDLOOP.
ENDFORM. "GET_DATA
*& Form GET_DATA1
text
FORM GET_DATA1.
DATA: BEGIN OF OTF OCCURS 0.
INCLUDE STRUCTURE ITCOO .
DATA: END OF OTF.
DATA: ITCPO LIKE ITCPO.
DATA: ITCPP LIKE ITCPP.
CLEAR OTF.
CLEAR ITCPO.
ITCPO-TDGETOTF = 'X'.
PERFORM COLLECT_DATA(Z111_PACKING_LIST) USING SVBELN."VBRK-VBELN.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = 'Z1111_PACKING'
LANGUAGE = SY-LANGU
OPTIONS = ITCPO
DIALOG = ' '
EXCEPTIONS
OTHERS = 1.
PERFORM DISPLAY_DATA(Z111_PACKING_LIST). "USING SVBELN." VBRK-VBELN.
Close up Form and get OTF code
CALL FUNCTION 'END_FORM'
EXCEPTIONS
ERROR_MESSAGE = 01
OTHERS = 02.
MOVE-CORRESPONDING ITCPO TO ITCPP.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = ITCPP
TABLES
OTFDATA = OTF
EXCEPTIONS
OTHERS = 1.
Move OTF code to structure SOLI form email
CLEAR SOLISTI1. REFRESH SOLISTI1.
LOOP AT OTF.
SOLISTI1-LINE = OTF.
APPEND SOLISTI1.
ENDLOOP.
ENDFORM. "GET_DATA1
*& Form GET_DATA2
text
FORM GET_DATA2.
DATA: BEGIN OF OTF OCCURS 0.
INCLUDE STRUCTURE ITCOO .
DATA: END OF OTF.
DATA: ITCPO LIKE ITCPO.
DATA: ITCPP LIKE ITCPP.
CLEAR OTF.
CLEAR ITCPO.
ITCPO-TDGETOTF = 'X'.
PERFORM COLLECT_DATA(Z111_AGENCY_NOTE) USING SVBELN."VBRK-VBELN.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = 'Z1111_AGENCY'
LANGUAGE = SY-LANGU
OPTIONS = ITCPO
DIALOG = ' '
EXCEPTIONS
OTHERS = 1.
PERFORM DISPLAY_DATA(Z111_AGENCY_NOTE) USING SVBELN." VBRK-VBELN.
Close up Form and get OTF code
CALL FUNCTION 'END_FORM'
EXCEPTIONS
ERROR_MESSAGE = 01
OTHERS = 02.
MOVE-CORRESPONDING ITCPO TO ITCPP.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = ITCPP
TABLES
OTFDATA = OTF
EXCEPTIONS
OTHERS = 1.
Move OTF code to structure SOLI form email
CLEAR SOLISTI1. REFRESH SOLISTI1.
LOOP AT OTF.
SOLISTI1-LINE = OTF.
APPEND SOLISTI1.
ENDLOOP.
ENDFORM. "GET_DATA2
FORM SEND_FORM_VIA_EMAIL *
FORM SEND_FORM_VIA_EMAIL.
CLEAR: MAILDATA, MAILTXT, MAILBIN, MAILPACK, MAILHEAD, MAILREC.
REFRESH: MAILTXT, MAILBIN, MAILPACK, MAILHEAD, MAILREC.
Creation of the document to be sent File Name
MAILDATA-OBJ_NAME = 'TEST'.
Mail Subject
MAILDATA-OBJ_DESCR = SUBJ ."'EGGRAFA BIBLOY'.
Mail Contents
MAILTXT-LINE = LINE1.
APPEND MAILTXT.
MAILTXT-LINE = LINE2.
APPEND MAILTXT.
MAILTXT-LINE = LINE3.
APPEND MAILTXT.
MAILTXT-LINE = LINE4.
APPEND MAILTXT.
MAILTXT-LINE = LINE5.
APPEND MAILTXT.
MAILTXT-LINE = LINE6.
APPEND MAILTXT.
Prepare Packing List
PERFORM PREPARE_PACKING_LIST.
Set recipient - email address here!!!
MAILREC-RECEIVER = '[email protected]'.
MAILREC-REC_TYPE = 'U'.
APPEND MAILREC.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = MAILDATA
PUT_IN_OUTBOX = ' '
TABLES
PACKING_LIST = MAILPACK
OBJECT_HEADER = MAILHEAD
CONTENTS_BIN = MAILBIN
CONTENTS_TXT = MAILTXT
RECEIVERS = MAILREC
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
COMMIT WORK.
ENDFORM. "SEND_FORM_VIA_EMAIL
Form PREPARE_PACKING_LIST
FORM PREPARE_PACKING_LIST.
CLEAR: MAILPACK, MAILBIN, MAILHEAD.
REFRESH: MAILPACK, MAILBIN, MAILHEAD.
DESCRIBE TABLE MAILTXT LINES TAB_LINES.
READ TABLE MAILTXT INDEX TAB_LINES.
MAILDATA-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( MAILTXT ).
Creation of the entry for the compressed document
CLEAR MAILPACK-TRANSF_BIN.
MAILPACK-HEAD_START = 1.
MAILPACK-HEAD_NUM = 0.
MAILPACK-BODY_START = 1.
MAILPACK-BODY_NUM = TAB_LINES.
MAILPACK-DOC_TYPE = 'RAW'.
APPEND MAILPACK.
Creation of the document attachment
This form gets the OTF code from the SAPscript form.
If you already have your OTF code, I believe that you may
be able to skip this form. just do the following code, looping thru
your SOLISTI1 and updating MAILBIN.
IF YHSD = 'X' .
PERFORM GET_OTF_CODE. "----
LOOP AT SOLISTI1.
MOVE-CORRESPONDING SOLISTI1 TO MAILBIN.
APPEND MAILBIN.
ENDLOOP.
DESCRIBE TABLE MAILBIN LINES TAB_LINES.
MAILHEAD = 'TEST.OTF'.
APPEND MAILHEAD.
ENDIF.
Creation of the entry for the compressed attachment
MAILPACK-TRANSF_BIN = 'X'.
MAILPACK-HEAD_START = 1.
MAILPACK-HEAD_NUM = 1.
MAILPACK-BODY_START = 1.
MAILPACK-BODY_NUM = TAB_LINES.
MAILPACK-DOC_TYPE = 'OTF'.
MAILPACK-OBJ_NAME = 'TEST01'.
MAILPACK-OBJ_DESCR = 'Subject01'.
MAILPACK-DOC_SIZE = TAB_LINES * 255.
APPEND MAILPACK.
IF ZHAG = 'X'.
PERFORM GET_OTF_CODE1. "----
LOOP AT SOLISTI1.
MOVE-CORRESPONDING SOLISTI1 TO MAILBIN.
APPEND MAILBIN.
ENDLOOP.
DESCRIBE TABLE MAILBIN LINES TAB_LINES.
MAILHEAD = 'TEST1.OTF'.
APPEND MAILHEAD.
ENDIF.
Creation of the entry for the compressed attachment
MAILPACK-TRANSF_BIN = 'X'.
MAILPACK-HEAD_START = 1.
MAILPACK-HEAD_NUM = 1.
MAILPACK-BODY_START = 1.
MAILPACK-BODY_NUM = TAB_LINES.
MAILPACK-DOC_TYPE = 'OTF'.
MAILPACK-OBJ_NAME = 'TEST02'.
MAILPACK-OBJ_DESCR = 'Subject02'.
MAILPACK-DOC_SIZE = TAB_LINES * 255.
APPEND MAILPACK.
IF ZPHL = 'X'.
PERFORM GET_OTF_CODE2. "----
LOOP AT SOLISTI1.
MOVE-CORRESPONDING SOLISTI1 TO MAILBIN.
APPEND MAILBIN.
ENDLOOP.
DESCRIBE TABLE MAILBIN LINES TAB_LINES.
MAILHEAD = 'TEST2.OTF'.
APPEND MAILHEAD.
ENDIF.
Creation of the entry for the compressed attachment
MAILPACK-TRANSF_BIN = 'X'.
MAILPACK-HEAD_START = 1.
MAILPACK-HEAD_NUM = 1.
MAILPACK-BODY_START = 1.
MAILPACK-BODY_NUM = TAB_LINES.
MAILPACK-DOC_TYPE = 'OTF'.
MAILPACK-OBJ_NAME = 'TEST03'.
MAILPACK-OBJ_DESCR = 'Ship.details-Agency.report-Packing.list'.
MAILPACK-DOC_SIZE = TAB_LINES * 255.
APPEND MAILPACK.
ENDFORM. "PREPARE_PACKING_LIST
Form GET_OTF_CODE
FORM GET_OTF_CODE.
PERFORM GET_DATA.
ENDFORM. "GET_OTF_CODE
Form GET_OTF_CODE1
FORM GET_OTF_CODE1.
PERFORM GET_DATA1.
ENDFORM. "GET_OTF_CODE1
Form GET_OTF_CODE2
FORM GET_OTF_CODE2.
PERFORM GET_DATA2.
ENDFORM. "GET_OTF_CODE2
END-OF-SELECTION.Hi Dimath,
Try the following FM:
CONVERT_OTF Convert SAP documents (SAPScript) to other types.
Example:
CALL FUNCTION "CONVERT_OTF"
EXPORTING FORMAT = "PDF"
IMPORTING BIN_FILESIZE = FILE_LEN
TABLES OTF = OTFDATA
LINES = PDFDATA
EXCEPTIONS ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
Hope this helps.
Reward if helpful.
Regards,
Sipra -
Unable to create IDOCs after client copy
I'm unable to create IDOCs after a client copy. I receive a SAPSQL_ARRAY_INSERT_DUPREC or insert of duplicate rows ABAP dump.
Does anyone know what how to fix this. Thank you in advance.
Runtime Error SAPSQL_ARRAY_INSERT_DUPREC
Except. CX_SY_OPEN_SQL_DB
Date and Time 22.10.2007 16:50:51
ShrtText
The ABAP/4 Open SQL array insert results in duplicate database records.
What happened?
Error in ABAP application program.
The current ABAP program "SAPLEDI1" had to be terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
What can you do?
Print out the error message (using the "Print" function)
and make a note of the actions and input that caused the
error.
To resolve the problem, contact your SAP system administrator.
You can use transaction ST22 (ABAP Dump Analysis) to view and administer
termination messages, especially those beyond their normal deletion
date.
is especially useful if you want to keep a particular message.
Error analysis
An exception occurred. This exception is dealt with in more detail below
. The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB', was
neither
caught nor passed along using a RAISING clause, in the procedure
"F09_IDOC_INSERT_WITH_NUMBER" "(FORM)"
Since the caller of the procedure could not have expected this exception
to occur, the running program was terminated.
The reason for the exception is:
If you use an ABAP/4 Open SQL array insert to insert a record in
the database and that record already exists with the same key,
this results in a termination.
(With an ABAP/4 Open SQL single record insert in the same error
situation, processing does not terminate, but SY-SUBRC is set to 4.)
How to correct the error
Use an ABAP/4 Open SQL array insert only if you are sure that none of
the records passed already exists in the database.
You may able to find an interim solution to the problem
in the SAP note system. If you have access to the note system yourself,
use the following search criteria:
"SAPSQL_ARRAY_INSERT_DUPREC" CX_SY_OPEN_SQL_DBC
"SAPLEDI1" or "LEDI1F09"
"F09_IDOC_INSERT_WITH_NUMBER"
If you cannot solve the problem yourself and you wish to send
an error message to SAP, include the following documents:
1. A printout of the problem description (short dump)
To obtain this, select in the current display "System->List->
Save->Local File (unconverted)".
2. A suitable printout of the system log
To obtain this, call the system log through transaction SM21.
Limit the time interval to 10 minutes before and 5 minutes
after the short dump. In the display, then select the function
"System->List->Save->Local File (unconverted)".
3. If the programs are your own programs or modified SAP programs,
supply the source code.
To do this, select the Editor function "Further Utilities->
Upload/Download->Download".
4. Details regarding the conditions under which the error occurred
or which actions and input led to the error.
The exception must either be prevented, caught within the procedure
"F09_IDOC_INSERT_WITH_NUMBER"
"(FORM)", or declared in the procedure's RAISING clause.
To prevent the exception, note the following:
System environment
SAP Release.............. "640"
Application server....... "auaplxr3q"
Network address.......... "128.197.135.5"
Operating system......... "AIX"
Release.................. "5.3"
Hardware type............ "000B439ED600"
Character length......... 8 Bits
Pointer length........... 64 Bits
Work process number...... 1
Short dump setting....... "full"
Database server.......... "auaplxr3q"
Database type............ "ORACLE"
Database name............ "Q63"
Database owner........... "SAPR3"
Character set............ "en_US.ISO8859-1"
SAP kernel............... "640"
Created on............... "Mar 22 2007 20:48:46"
Created in............... "AIX 1 5 00538A4A4C00"
Database version......... "OCI_920 "
Patch level.............. "175"
Patch text............... " "
Supported environment....
Database................. "ORACLE 9.2.0.., ORACLE 10.1.0.., ORACLE
10.2.0.."
SAP database version..... "640"
Operating system......... "AIX 1 5, AIX 2 5, AIX 3 5"
Memory usage.............
Roll..................... 16128
EM....................... 4189928
Heap..................... 0
Page..................... 0
MM Used.................. 1469352
MM Free.................. 2718056
SAP Release.............. "640"
User and Transaction
Information on where terminated
The termination occurred in the ABAP program "SAPLEDI1" in
"F09_IDOC_INSERT_WITH_NUMBER".
The main program was "SAPMSSY1 ".
The termination occurred in line 108 of the source code of the (Include)
program "LEDI1F09"
of the source code of program "LEDI1F09" (when calling the editor 1080).
Processing was terminated because the exception "CX_SY_OPEN_SQL_DB" occurred in
the
procedure "F09_IDOC_INSERT_WITH_NUMBER" "(FORM)" but was not handled locally,
not declared in the
RAISING clause of the procedure.
The procedure is in the program "SAPLEDI1 ". Its source code starts in line 5
of the (Include) program "LEDI1F09 ".
Source Code Extract
Line
SourceCde
78
perform call_badi tables list_container_insert
79
using control
80
ident.
81
Aufruf des Badi's für das einstreuen neuer Segmente
82
perform call_insert_badi tables list_container_insert
83
using control
84
ident
85
changing maxsegnum.
86
87
free list_container_insert
88
FREE_RETURN = 1.
89
ELSE. " no other IDoc is open in create-mode
90
LOOP AT LIST_CONTAINER_CREATE WHERE MANDT EQ SY-MANDT
91
AND DOCNUM EQ IDENT.
92
LIST_CONTAINER_CREATE-DOCNUM = DOCNUM.
93
MODIFY LIST_CONTAINER_CREATE.
94
ADD 1 TO MAXSEGNUM.
95
ENDLOOP.
96
if control-mestyp eq c_mestyp.
97
CALL FUNCTION 'FUNCTION_EXISTS'
98
EXPORTING
99
funcname = c_func
100
EXCEPTIONS
101
FUNCTION_NOT_EXIST = 1.
102
IF syst-subrc IS INITIAL. "Anwendungssystem
103
perform call_transform
104
tables list_container_create
105
using control.
106
ENDIF.
107
endif.
>>>>>
INSERT EDID4 FROM TABLE LIST_CONTAINER_CREATE.
109
Aufruf des Badi's für das Anwendungsmapping einzelner Felder
110
perform call_badi tables list_container_create
111
using control
112
ident.
113
perform call_insert_badi tables list_container_create
114
using control
115
ident
116
changing maxsegnum.
117
118
free list_container_create
119
FREE_RETURN = 0.
120
ENDIF.
121
122
insert status records
123
124
SYN_ERROR_IN = ' '.
125
CNTR_STATUS = 0.
126
REFRESH LIST_STATUS.
127
CLEAR LIST_STATUS.
Contents of system fields
Name
Val.
SY-SUBRC
0
SY-INDEX
2
SY-TABIX
1
SY-DBCNT
1
SY-FDPOS
0
SY-LSIND
0
SY-PAGNO
0
SY-LINNO
1
SY-COLNO
1
SY-PFKEY
SY-UCOMM
SY-TITLE
CPIC and RFC Control
SY-MSGTY
SY-MSGID
SY-MSGNO
000
SY-MSGV1
SY-MSGV2
SY-MSGV3
SY-MSGV4
Active Calls/Events
No. Ty. Program Include Line
Name
13 FORM SAPLEDI1 LEDI1F09 108
F09_IDOC_INSERT_WITH_NUMBER
12 FUNCTION SAPLEDI1 LEDI1U19 33
EDI_DOCUMENT_CLOSE_CREATE_TAB
11 FUNCTION SAPLEDIR LEDIRU01 273
IDOC_INBOUND_WRITE_TO_DB
10 FORM SAPLEDIN LEDINF01 457
ONE_IDOC_STORE
9 FUNCTION SAPLEDIN LEDINU05 234
IDOC_INBOUND_ASYNCHRONOUS
8 FORM SAPLEDIN LEDINV05 19
IDOC_INBOUND_ASYNCHRONOUS
7 FORM SAPMSSY1 SAPMSSY1 254
XAB_RUN_DRIVER
6 FUNCTION SAPLSXAB LSXABU01 9
RFC_RUN_XAB_DRIVER
5 FUNCTION SAPLERFC LERFCU01 59
ARFC_EXECUTE
4 FUNCTION SAPLERFC LERFCU02 229
ARFC_DEST_SHIP
3 FORM SAPLERFC LERFCV02 28
ARFC_DEST_SHIP
2 FORM SAPMSSY1 SAPMSSY1 69
REMOTE_FUNCTION_CALL
1 MODULE (PBO) SAPMSSY1 SAPMSSY1 30
%_RFC_START
Chosen variables
Name
Val.
No. 13 Ty. FORM
Name F09_IDOC_INSERT_WITH_NUMBER
CONTROL-MESTYP
USERCLONE
554544444222222222222222222222
53523CFE5000000000000000000000
C_MESTYP
FIDCCH
444444222222222222222222222222
694338000000000000000000000000
SY-XFORM
IDOC_INBOUND_ASYNCHRONOUS
444454444544545544454445522222
94F3F9E2F5E4F139E382FEF5300000
LIST_STATUS-STAPA2
22222222222222222222222222222222222222222222222222
00000000000000000000000000000000000000000000000000
C_FUNC
IDOC_TRANSFORM
444455544544542222222222222222
94F3F421E36F2D0000000000000000
SYST-REPID
SAPLEDI1
5454444322222222222222222222222222222222
310C549100000000000000000000000000000000
SY-UNAME
Q63CLNT140
533444533322
1633CE414000
%_DUMMY$$
2222
0000
SY-MSGV1
22222222222222222222222222222222222222222222222222
00000000000000000000000000000000000000000000000000
SYST-SUBRC
0
0000
0000
ALE_IDOC_TO_APL_OK
62
33
62
LIST_CONTAINER_CREATE[]
Table IT_20[9x1068]
FUNCTION-POOL=EDI1DATA=LIST_CONTAINER_CREATE[]
Table reference: 14
TABH+ 0(20) = 070000008036F5B8000000000000000000000000
TABH+ 20(20) = 0000000E00000014000000090000042CFFFFFFFF
TABH+ 40(16) = 0400002300000CA0000824C401000000
store = 0x070000008036F5B8
ext1 = 0x0000000000000000
shmId = 0 (0x00000000)
id = 14 (0x0000000E)
label = 20 (0x00000014)
fill = 9 (0x00000009)
leng = 1068 (0x0000042C)
loop = -1 (0xFFFFFFFF)
xtyp = TYPE#000048
occu = 8 (0x00000008)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 8 (cmpManyEq)
occu0 = 1
collHash = 0
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
>>>>> Shareable Table Header Data <<<<<
tabi = 0x070000008036F610
pghook = 0x07000000802D86D0
idxPtr = 0x0000000000000000
refCount = 0 (0x00000000)
tstRefCount = 0 (0x00000000)
lineAdmin = 16 (0x00000010)
lineAlloc = 16 (0x00000010)
store_id = 23 (0x00000017)
shmIsReadOnly = 0 (0x00000000)
>>>>> 1st level extension part <<<<<
regHook = Not allocated
hsdir = Not allocated
ext2 = Not allocated
>>>>> 2nd level extension part <<<<<
tabhBack = Not allocated
delta_head = Not allocated
pb_func = Not allocated
pb_handle = Not allocated
LIST_CONTAINER_CREATE
1400000000000511747000000009E1BPADRML 00000002#èXD63 070TST_QA140_1
3333333333333333333333333333434544544222222222222222222222333333330E54332222222233355555433353
14000000000005117470000000095120142DC0000000000000000000000000000238846300000000070434F11140F1
CONTROL
1400000000000511747640 64 2SAPQ63 LSQ63CLNT140
3333333333333333333333233222222223545533222245533444533322222222222222222222222222222222222222
14000000000005117476400640000000023101630000C31633CE414000000000000000000000000000000000000000
G_MAXSYNERR
1
0000
0001
<%_TABLE_EDID4>
ALE_DISPATCH_ERROR
27
33
27
ALE_IDOC_READY_FOR_APL
64
33
64
%_SPACE
2
0
IDENT
0000000000000001
3333333333333333
0000000000000001
ALE_IDOC_TO_APL_ERROR
63
33
63
No. 12 Ty. FUNCTION
Name EDI_DOCUMENT_CLOSE_CREATE_TAB
IDENTIFIER
0000000000000001
3333333333333333
0000000000000001
NO_DEQUEUE
X
5
8
SYN_ACTIVE
Y
5
9
IDOC_CONTROL
1400000000000511747640 64 2SAPQ63 LSQ63CLNT140
3333333333333333333333233222222223545533222245533444533322222222222222222222222222222222222222
14000000000005117476400640000000023101630000C31633CE414000000000000000000000000000000000000000
SYNTAX_RETURN
0
0000
0000
INT_EDIDD[]
Table IT_10[9x1062]
FUNCTION-POOL=EDINDATA=G_T_DATA_RECORDS[]
Table reference: 9
TABH+ 0(20) = 0700000080284B80070000008028530800000000
TABH+ 20(20) = 000000090000000A0000000900000426FFFFFFFF
TABH+ 40(16) = 0400000900000AA8000824C401000000
store = 0x0700000080284B80
ext1 = 0x0700000080285308
shmId = 0 (0x00000000)
id = 9 (0x00000009)
label = 10 (0x0000000A)
fill = 9 (0x00000009)
leng = 1062 (0x00000426)
loop = -1 (0xFFFFFFFF)
xtyp = TYPE#000039
occu = 8 (0x00000008)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 8 (cmpManyEq)
occu0 = 1
collHash = 0
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
>>>>> Shareable Table Header Data <<<<<
tabi = 0x0700000080320D90
pghook = 0x07000000802E1508
idxPtr = 0x0000000000000000
refCount = 0 (0x00000000)
tstRefCount = 0 (0x00000000)
lineAdmin = 16 (0x00000010)
lineAlloc = 16 (0x00000010)
store_id = 17 (0x00000011)
shmIsReadOnly = 0 (0x00000000)
>>>>> 1st level extension part <<<<<
regHook = 0x0000000000000000
hsdir = 0x0000000000000000
ext2 = 0x07000000802852A8
>>>>> 2nd level extension part <<<<<
tabhBack = 0x0700000080284B30
delta_head = 0000000000000000000000000000000000000000000000000000000000000000000000000000000
pb_func = 0x0000000000000000
pb_handle = 0x0000000000000000
NO_IGNORE
2
0
EDI_IDOC_SYNTAX_ERROR_IN
60
33
60
DOCNUM
0000000000511747
3333333333333333
0000000000511747
EXCLUSIVE
E
4
5
SYNCHRONOUS
S
5
3
APL_TESTIDOC_CHECK_OK
55
33
55
FREE_RETURN
0
0000
0000
INT_EDIDD
1400000000000000001000009E1BPADRML 00000000##XD63 070TST_QA140_17 X00
3333333333333333333333333434544544222222222222222222333333330054332222222233355555433353322533
14000000000000000010000095120142DC0000000000000000000000000000846300000000070434F11140F1700800
SUB_INT_ACK_POSITIVE
14
33
14
G_INSERT_OK
2
0
LIST_CONTAINER_INSERT_TMP[]
Table[initial]
LIST_CONTAINER_INSERT_TMP
0000000000000000000000000 00000000##
2223333333333333333333333333222222222222222222222222222222333333330022222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%_ARCHIVE
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
No. 11 Ty. FUNCTION
Name IDOC_INBOUND_WRITE_TO_DB
PI_DO_HANDLE_ERROR
X
5
8
PI_NO_DEQUEUE
X
5
8
PI_RETURN_DATA_FLAG
X
5
8
PI_RFC_MULTI_CP
0000
3333
0000
PI_STATUS_MESSAGE
000000000000000000000000000000000000000000000000000000000000
2223333333333333333333333333333333333333333333333333333333333332222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
PE_IDOC_NUMBER
0000000000000001
3333333333333333
0000000000000001
PE_INBOUND_PROCESS_DATA
140BAPI 6
3334454222222222222222222222222222222222222222222222222223222222222222222222222222222222222222
1402109000000000000000000000000000000000000000000000000006000000000000000000000000000000000000
PE_STATE_OF_PROCESSING
0
0000
0000
T_DATA_RECORDS[]
Table IT_10[9x1062]
T_LINKED_OBJECTS[]
Table IT_11[0x100]
FUNCTION-POOL=EDINFORM=ONE_IDOC_STOREDATA=LT_LINKED_OBJECTS[]
Table reference: 10
TABH+ 0(20) = 000000000000000007000000802853F000000000
TABH+ 20(20) = 0000000A0000000B0000000000000064FFFFFFFF
TABH+ 40(16) = 0400000900002BB00010249401000000
store = 0x0000000000000000
ext1 = 0x07000000802853F0
shmId = 0 (0x00000000)
id = 10 (0x0000000A)
label = 11 (0x0000000B)
fill = 0 (0x00000000)
leng = 100 (0x00000064)
loop = -1 (0xFFFFFFFF)
xtyp = TYPE#000190
occu = 16 (0x00000010)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 2 (cmpSingleMcmpR)
occu0 = 1
collHash = 0
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
>>>>> Shareable Table Header Data <<<<<
tabi = Not allocated
pghook = Not allocated
idxPtr = Not allocated
refCount = Not allocated
tstRefCount = Not allocated
lineAdmin = Not allocated
lineAlloc = Not allocated
store_id = Not allocated
shmIsReadOnly = Not allocated
>>>>> 1st level extension part <<<<<
regHook = 0x0000000000000000
hsdir = 0x0000000000000000
ext2 = 0x0700000080285390
>>>>> 2nd level extension part <<<<<
tabhBack = 0x0700000080285340
delta_head = 0000000000000000000000000000000000000000000000000000000000000000000000000000000
pb_func = 0x0000000000000000
pb_handle = 0x0000000000000000
PC_CONTROL_RECORD
1400000000000000000 30 2 LSQ63CLNT140
3333333333333333333222233222222223222222222245533444533322222222222222222222222222222222222222
14000000000000000000000300000000020000000000C31633CE414000000000000000000000000000000000000000
%_VIASELSCR
0
4
%_SPACE
2
0
L_STATUS
64
33
64
L_ALE_SUCCESS_MESSAGE
B1 S005 No filters
4322222222222222222253332222222222222222222222222222222222222222222222222246266676772222222222
21000000000000000000300500000000000000000000000000000000000000000000000000EF069C45230000000000
ST_PREVIOUS_PARTNER_DATA-SYNCHK
X
5
8
C_TRUE
X
5
8
SYST-REPID
SAPLEDIR
5454444522222222222222222222222222222222
310C549200000000000000000000000000000000
C_ELEMENT_UNPROCESSED_IDOCS
Unprocessed_IDocs
56776667766544667222222222222222
5E02F353354F94F33000000000000000
ST_PREVIOUS_STATE_OF_PROCE
0
0000
0000
ST_INBOUND_PROCESS_DATA-EDIVR2
6
3
6
SY-MSGV4
22222222222222222222222222222222222222222222222222
00000000000000000000000000000000000000000000000000
L_SYN_ACTIVE
Y
5
9
SY-XFORM
IDOC_INBOUND_ASYNCHRONOUS
444454444544545544454445522222
94F3F9E2F5E4F139E382FEF5300000
L_SYNTAX_RETURN
0
0000
0000
%_DUMMY$$
2222
0000
SY-REPID
SAPLEDIR
5454444522222222222222222222222222222222
310C549200000000000000000000000000000000
No. 10 Ty. FORM
Name ONE_IDOC_STORE
IDOC_NUMBER_IN
0000000000000000
3333333333333333
0000000000000000
STATE_OF_PROCESSING_IN
0
0000
0000
INBOUND_PROCESS_DATA_IN
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
GT_NEW_IDOC_IDENTIFICATIONS[]
Table[initial]
G_LAST_IDOC_NUMBER
0000000000000000
3333333333333333
0000000000000000
SYST-REPID
SAPLEDIN
5454444422222222222222222222222222222222
310C549E00000000000000000000000000000000
CURRENT_CONTROL_RECORD_IN-DOCNUM
0000000000000000
3333333333333333
0000000000000000
CONV_ERROR
2
0
C_TRUE
X
5
8
SY
0000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000
0002000000010009000000000000000000000000000100000001000000010000000000000000004C00000000000000
STATUS_MESSAGE_IN
000000000000000000000000000000000000000000000000000000000000
2223333333333333333333333333333333333333333333333333333333333332222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
C_IDOC_SELECT_AND_WRITE_TO_DB
5
3
5
SY-REPID
SAPLEDIN
5454444422222222222222222222222222222222
310C549E00000000000000000000000000000000
STATUS_MESSAGE_IN-STAMID
22222222222222222222
00000000000000000000
GT_NEW_IDOC_IDENTIFICATIONS
0000000000000000
3333333333333333222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
SPACE
2
0
STATUS_MESSAGE_IN-STAMNO
000
333
000
RET_FLAG
X
5
8
G_RFC_CODEPAGE
0000
3333
0000
RSJOBINFO-JOBSUBRC
0
0000
0000
SY-XFORM
IDOC_INBOUND_ASYNCHRONOUS
444454444544545544454445522222
94F3F9E2F5E4F139E382FEF5300000
SY-LANGU
E
4
5
G_T_DATA_RECORDS[]
Table IT_10[9x1062]
LT_LINKED_OBJECTS[]
Table IT_11[0x100]
CURRENT_CONTROL_RECORD_IN
1400000000000000000 30 2 LSQ63CLNT140
3333333333333333333222233222222223222222222245533444533322222222222222222222222222222222222222
14000000000000000000000300000000020000000000C31633CE414000000000000000000000000000000000000000
%_DUMMY$$
2222
0000
SWO_%OBJID
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
No. 9 Ty. FUNCTION
Name IDOC_INBOUND_ASYNCHRONOUS
IDOC_CONTROL_REC_40[]
Table IT_3[1x524]
FUNCTION-POOL=EDINFORM=IDOC_INBOUND_ASYNCHRONOUSDATA=IDOC_CONTROL_REC_40[]
Table reference: 3
TABH+ 0(20) = 07000000802D876007000000802D449000000000
TABH+ 20(20) = 0000000300000003000000010000020C000000E0
TABH+ 40(16) = 0400000900001FE0000A249001000000
store = 0x07000000802D8760
ext1 = 0x07000000802D4490
shmId = 0 (0x00000000)
id = 3 (0x00000003)
label = 3 (0x00000003)
fill = 1 (0x00000001)
leng = 524 (0x0000020C)
loop = 224 (0x000000E0)
xtyp = TYPE#000136
occu = 10 (0x0000000A)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 2 (cmpSingleMcmpR)
occu0 = 0
collHash = 0
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
>>>>> Shareable Table Header Data <<<<<
tabi = 0x07000000802DB9D8
pghook = 0x0000000000000000
idxPtr = 0x0000000000000000
refCount = 0 (0x00000000)
tstRefCount = 0 (0x00000000)
lineAdmin = 10 (0x0000000A)
lineAlloc = 10 (0x0000000A)
store_id = 9 (0x00000009)
shmIsReadOnly = 0 (0x00000000)
>>>>> 1st level extension part <<<<<
regHook = 0x0000000000000000
hsdir = 0x0000000000000000
ext2 = 0x07000000802D88A0
>>>>> 2nd level extension part <<<<<
tabhBack = 0x07000000802D8710
delta_head = 0000000000000000000000000000000000000000000000000000000000000000000000000000000
pb_func = 0x0000000000000000
pb_handle = 0x0000000000000000
IDOC_DATA_REC_40[]
Table IT_4[9x1063]
FUNCTION-POOL=EDINFORM=IDOC_INBOUND_ASYNCHRONOUSDATA=IDOC_DATA_REC_40[]
Table reference: 4
TABH+ 0(20) = 07000000802D880807000000802D896000000000
TABH+ 20(20) = 00000004000000040000000900000427FFFFFFFF
TABH+ 40(16) = 04000009000020500008249001000000
store = 0x07000000802D8808
ext1 = 0x07000000802D8960
shmId = 0 (0x00000000)
id = 4 (0x00000004)
label = 4 (0x00000004)
fill = 9 (0x00000009)
leng = 1063 (0x00000427)
loop = -1 (0xFFFFFFFF)
xtyp = TYPE#000138
occu = 8 (0x00000008)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 2 (cmpSingleMcmpR)
occu0 = 0
collHash = 0
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
>>>>> Shareable Table Header Data <<<<<
tabi = 0x07000000802E1550
pghook = 0x07000000802D8860
idxPtr = 0x0000000000000000
refCount = 0 (0x00000000)
tstRefCount = 0 (0x00000000)
lineAdmin = 16 (0x00000010)
lineAlloc = 16 (0x00000010)
store_id = 12 (0x0000000C)
shmIsReadOnly = 0 (0xHi Rohan,
Welcome to SDN!
This error means that you're trying to duplicate a record on the DB... check the IDOC number ranges... it might help
Regards
Juan
Please reward with points if helpful -
Update error while creating production order (TCODE CO01)
Hello,
We have created new plant into development server for testing. We have created production Order few days back at that time we have not faced any problem. But from last two days , when we create new production Order , system gives following error:
ORA-00947: not enough values
DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB
SAPLCOVB" or "LCOVBF10"
HEADER_POST"
and
Update was terminated
System ID.... DEV
Client....... 500
User..... HPLSU
Transaction.. CO01
Update key... 4B6E4F48C08D027FE1008000C0A802F3
Generated.... 08.02.2010, 10:35:48
Completed.... 08.02.2010, 10:35:49
Error Info... 00 671: ABAP/4 processor: DBIF_RSQL_SQL_ERROR
Our work is held up.
Please also note that If we increase the QTY in the existing Order ( already created few days back) , System accept the same and Order is saved.
We are looking for the solution for the above.
Early reply will be highly appreciated.
thanks
harishHi Rishi,
You better check with your BASIS team.
Check this link also
Supervisor Error ADM0015
Regards,
Satyajit Kumar
Edited by: Satyajit Kumar on Feb 8, 2010 7:47 AM -
Not able to post the Time for already created timecard
Hi All,
I have a question on OTL, already time is posted for a week say 29-MAY-2010 to 06-JUN-2010 (for 5 working days), now I need to post the time on saturday & sunday too.
I'm using all the mentioned API's given by the oracle. But while processing the API's, it is throwing an error saying 'Time is already posted for this period'.
Time is posted for the week (start date & end date) but not on saturday & sunday.
Can any one help me out of this issue.
Below is the list of API's I'm using.
1.hxc_timestore_deposit.create_timecard_bb - To create the timecard for the period (in this case it is week)
2.hxc_timestore_deposit.create_day_bb - To create the day wise records for the above timecard id.
3.hxc_timestore_deposit.create_detail_bb - To create the detail hours for the above day wise records.
4.hxc_timestore_deposit.execute_deposit_process - To submit the timecard for the approval.
Thanks in advance..
--RajaCan you share your code you are using for update? It looks like you are treating the update case as create case. Make sure you use the update apis' during timecard update.
--Shiv -
Hi
I had created IDOCS by following this procedure
<b>Step 1 Analyse Hierarchy Levels:</b>
Analyse the data relationships being processed in the interface. Define the appropriate hierarchical Parent-to-Child relationships.
Navigate to transaction code WEDI
Transaction WEDI displays the IDOC main menu. This allows navigation around the various development and control areas to create a customised IDOC.
<b>Step 2 Create a new segment:</b>
via wedi : Development - IDOC Segments or Transaction code WE31.
Enter segment name and click on Create.
The name of the segment type must start with Z1 , and have a maximum of eight characters.
Enter description and enter the relevant field names and data elements.
The segment should represent a structure in the program so for each field in the segment a field name and a data element must be defined.
Save the segment and enter Person Responsible and Processing Person .
Go to Edit and Set Release.
Repeat this procedure for each new Segment in the IDOC.
<b>Step 3 Create a new IDOC Type</b>
via wedi Development - IDOC Types or Transaction WE30.
Enter segment name (starting with Z), click on Basic Type and then Create.
Create as new, enter Person Responsible and Processing Person and enter description.
On Create Basic Type screen decide where segments should be inserted and go to Edit/Create Segment.
Complete relevant fields in the Maintain Attributes screen:
From the relevant segments created in Step 2 enter the Segment type and if mandatory segment.
The Minimum and Maximum number of segments to be allowed in the sequence. (One minimum and one maximum if segment is mandatory).
The Parent Segment and Hierarchy Level will be automatically created depending on where in the IDOC tree you decided to create that particular segment.
Repeat this process for each segment needed in the IDOC type, deciding whether to add the next segments at the same level or as a Child.
When IDOC created return to initial screen. Go to Edit and Set Release.
Go to Transaction WE60 to view the IDoc Type you have created.
<b>Step 4 Create new Message Type</b>
via wedi Development - Message Types or Transaction WE81.
Display/Change and click on New Entries
Create a new Message Type and Save.
<b>Step 5 Link Message Type to IDOC Type</b>
via wedi Development - IDOC Type/Message or Transaction WE82.
Display/Change and then click on New Entries.
Enter Message Type, Basic Type (IDOC Type) and Release (46C) and Save.
<i><b>Now my problem from this step</b></i>
<b>Step 6 Create an entry in EDP13 via transactions WE20 and BD64.</b>
The partner profile for the Idoc must be set up and generated in the transaction BD64 and transaction WE20.
WE20 Add Message Type to appropriate Partner Type, Enter Message Type, Receiver Port and Idoc Type and Save.
BD64 Create a Model View, Enter Sender and Receiver Ports, Attach Message Type. Go to Environment on Menu and click on Generate Partner Profiles and generate (not save) profile.
<i><b>From where i have to add message type to partner type</b></i>
Can any one explain me clearly step by step after this step
Helpfull points will be surely rewarded
Regards
PavanHi Pavan,
You have the Partner number? which is nothing but your Logical system name or vendor or customer. I think in your case, it is Logical system.
Select or create an logical system. If already exist, select the option LS in the left hand side and display it. IN WE20. Now, give you Message type and save it.
But, If we say in your case as ALE, Goto Tcode SALE, Nagivate and create logical system for sender and reciver.
2. Then assign these Logical system to the clients.
3. GOto Tcode SM59 and create RFC destination.
4.Tcode- BD64 , Display it and select create model view options. and save it.
5. Now, go for Assign message type and assingn the message type alon with your logical system name for recevier and sender.
6. Goto Status bar ENVIRONMENT and select generate partner profile. Automatically, a partner profile will be generated.
7.Now GOTO EDIT , Model view -
distribute.
Thanks
Manju. -
I have downloaded Idoc(Already existing in the system with status 53) data using FM IDOC_READ_COMPLETELY(by passing an Idoc number) and passing this downloaded data to FM MASTER_IDOC_DISTRIBUTE to create new Idoc with same data.
Idoc does gets created but with status 29(Partner profile missing). I am not able to figure out what is going wrong because Idoc already exists in the system with same data so how can the new Idoc with same data have this issue?
Also I tried to maintain the partner profile data( that i got as warning message in Long text after the creation of Idoc) but still it did not help.Hi Nabheet,
Simply created a report where one FM gets data and using same data I try to create Idoc.
Even this fails to get the Idoc into correct status:
CALL FUNCTION 'IDOC_READ_COMPLETELY'
EXPORTING
document_number = 0000000041115636
IMPORTING
idoc_control = e_edidc
TABLES
int_edids = ts_edids
int_edidd = ts_edidd
EXCEPTIONS
document_not_exist = 1
document_number_invalid = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
master_idoc_control = e_edidc
TABLES
communication_idoc_control = ts_edidc
master_idoc_data = ts_edidd
EXCEPTIONS
error_in_idoc_control = 1
error_writing_idoc_status = 2
error_in_idoc_data = 3
sending_logical_system_unknown = 4
OTHERS = 5.
IF sy-subrc EQ 0.
ENDIF. -
Want to create IDoc to Webservice Scenario
Hi All,
I wan to do Idoc to Web Service Scenario, I have already done Idoc to File Scenario and I have mapped the file of both end in ESR and I am done with Configuration in Integration Directory.
Now If I want to convert it to IDoc to Web Service Scenario, what all steps need to be done. and also want to know that How we can access and Send the files from Web Service to PI 7.1. As such web service is not available need to create the same also.
Can anyone provide How to guide on this scenario.
Regards,
Nitin Patil
Edited by: Nitin Patil on Dec 19, 2008 2:44 PMHey,
as you have familiar with idoc to file, the idoc to webservice scenario is not different.
You need to do the ALE settings on the R\3 side. import the Idoc in XI.
Now for mapping purpose you need the source and the target structure.
In case of webservice you need to import the WSLD (unlike the file in which you wold have created the data type and message type)
In order to import the WSLD, you need to do following things.
Ou require NWDS and the following settings needs to be done
Deployement of Web Services:-
Step 1)
Goto Windows->Open Perspective->J2EE development.
Step 2)
Goto File->new->Ejb module(give project name).
Step 3)
Right Click on the <project name> eg. work_ejb select new->Ejb.
Step 4)
Give an appropriate EJB name and default package (eg. com.xxx.yyy).
Also select stateless Ejb.
Click next then next and then next.
Step 5)
Add method with an appropriate name.
Mention the return type and also assign the required parameters.
Logic is written in the EJB module bean.
Step 6)
Right click on the <project name> and build.
Creates .jar
Step 7)
Goto File->new->Enterprise Application project(to create EAR)
Step 8)
Give project name, assign EJB and build.
Creates EAR.
Step 9)
Right Click on the EJB.
Goto new->Web services.
Specify name of the web service.
Specify EAR in the WEB service.
Step 10)
Build EAR.
Build Ejb.
Step 11)
Goto Windows->Prefrences->SAP j2EE engine.
Give the message server host name.
Step 12)
Right Click on EAR and deploy.
Step 13)
Goto-> http://<host name>:<port no.>/index.
Step 14)
Choose the web service name,test it and download it(default WSDL).
Step 15)
Import port(WSDL) in External definition of SAP PI.
After you import the wsld, you need to follow the same procedure as idoc to file.
regards,
Milan -
Is there a Button menu option in InDesign CS 5.5 that will allow one view the names of all the buttons already created?
Thanks for your prompt feedback! However, this option does not work for me -- and I'm not sure exactly why.
Originally, when I tried your suggestion, I got the unsatisfactory result illustrated in the following help request: https://support.mozilla.com/en-US/questions/758172
Now I am in the process of testing several new add-ons to fix this problem, and I am getting a very different (and even more unsatisfying) result illustrated in the attached image -- so I realize the problem may now be compounded by one or more of the new add-ons.
(See the attached image that illustrates what happens now when I click on the MyDocs URL after is has been added to my Bookmarks tree.)
UPDATE: I'm going to try the LocalLinks add-on to see if this will help me open local links using my FireFox bookmarks: https://addons.mozilla.org/en-US/firefox/addon/locallink/
Will let you know if it works.... -
How to create idocs for existing records
Hi
are there any standard program by which i could create and send the existing customer invoice (VF01) data thru EDI idoc to a 3rd party system even if the output type is not defined during the creation of the invoices?
Regards
SujaiI am supposed to send all customer invoice data to an external system. I have been able to configure the system to trigger an idoc when an invoice is saved. That takes care of my delta transfer. But i would like to know if there is a way by which i can send all the existing customer invoice data to the 3rd party system that were already created in the SAP system. Something like an initial download of all the existing records.
I am asked to keep the abap development to Zero as far as possible, hence i am exploring the idea of finding any standard program that could do this for me.
just like Tx: BD10 for the material master data.
I tried VF31 but the problem is that the invoice that would have been created might not contain the output type as EDI. So is there a way by which i can achieve this task with any standard program?
I also have another question:
how do i do the configuration to send all the SD invoices to a specific partner all the time thru EDI by default?
Sujai -
Update Asset when creating Equipment
Hi,
The following scenario I have setup. First I create a new asset. Then I create a Purchase order (PO) with Account Assignment Asset where I use the new created asset. In the PO I use a material with serial number profile. During the Goods Recipts (GR), de costs are automatically posted to the asset that was used in the PO. And during GR the Equipments are automatically created based on the serial number profile. So far so good. But this scenarios created no link between the asset and the equipment. And I know how to setup synchronization between assets and equipment, but that is if you create an equipment and you want automatically the asset to be created. In our case the asset was already created before the PO and all I want is that the asset is updated with the equipment number at the moment tha the equipment is created during GR. I hope anyone can help me with this.
Thanks and regards.
RoelI have linked the asset and material via equipment master a while ago. Please try below and let me know if you have any further questions.
Cofig-steps
1. Create a non-valuated Material 'Test' and assign serial no profile ex. 0001.
2. Configure a Asset Class (Ex. 2000) to create equipment along with asset (search IMG for 'Automatic Creation of Equipment Master Records')
Steps:
1. Create PO with Material 'Test' , Account Assignment Category 'A'. In ME21N, Create a new asset in asset class (ex. 2000). Equipment master is auto created.
2. GR the material with a serialnumber or use equipment# itself as serial#. Equipment gets added in the Product structure of the material.
3. Invoice posting assigns the value to asset. -
Logic to update the table with IDOC numbers
Hi all,
I have an issue while I am running my interface. The IDOCs are getting generated and are displaying in WE02 successfully. But in my logic, I have a requirement to update these created IDOCs in a customized database table. This table has the IDOC number as the first key field.
Now the issue is that when a file is placed on the FTP server with the data, the IDOCs get generated with no doubt but the table is not getting updated with these IDOC numbers due to which my other data is also not seen in my table.
Please help with the logic that I need to place to update these IDOC numbers in my table.
Thanks.
TaarikhaAlso, this is happening when the file is placed. But when i run it manually through WE19 one by one, it has no problem. When it collectively run thorugh the file in background, this issue is ocuuring. Please help.
Thanks.
Taarikha
Maybe you are looking for
-
Not able to see the Image in the body of email
Hi I need to send email having image in the body. I have created a file in mime repository but not able to take its value in my abap program. I am using WWW_GET_MIME_OBJECT to be used in the body of the mail. Anybody having clue about it. Thanks & R
-
hi, help with frustration, please. i have created a slideshow in imovie complete with ken burns and audio and now i want to burn a dvd. i have imported it all right and it plays in idvd. idvd will not burn it! i get an error message that states: ''er
-
AppleTV 2g connected to HDMI to VGA adapter
I connected my AppleTV to my TV via a HDMI to VGA adapter. On power gives no signal and display a message "Out of Range", to connect another device with the same adapter works properly.
-
Error everytime I export in Premiere Elements 7.0
I have made a slideshow with pictures that is ONLY 3 minutes long. It has one song added to it. In Adobe Photoshop elements I can save it with no problem. However, in Premiere I have tried saving it to Youtube, saving it as a windows media file, savi
-
I'm trying to update from OS 10.4 to 10.4.3. When attempting the Install, I'm told that I don't have enough room on my HD. I have 33.5 GB Free. It needs only 292MB. What gives???? It shows a red slash on my drive when attempting to Install. Thanks fo