Number of IDOC generated
Hello,
I am using a outbound IDOC and at the end of IDOC generation want to know number of IDOC generated.
I have used message S644(ZSD) for that, but how to write logic to get number of IDOC generated.
I am using MASTER_IDOC_DISTRIBUTE FM.
Thanks
IDOC number would be set in the Control Table parameter COMMUNICATION_IDOC_CONTROL.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
master_idoc_control = ls_edidc
TABLES
communication_idoc_control = lt_edidc " <<
READ TABLE lt_edidc INDEX 1 INTO ls_edidc TRANSPORTING docnum.
lv_idoc_number = ls_edidc-docnum. " <<
Regards,
Naimesh Patel
Similar Messages
-
How to find the number of idocs generated for a customer on the basis of his purchase order in a day ?
Dear Friends,
I am absolutely agree with your answer .
But my question is,
Lets say.....
One customer sending X number of purchase orders in a day , so how many IDocs generated on that specific day for that specific customer .
So, Question is , How can we find the no of sales orders(IDocs) generated for the customers on the specific day ?
Hope you all understood my requirement .
Thanks & Regards,
Aditya -
Get IDoc number for IDoc generated through RBDMIDOC
Hi All,
I have a requirement where in I need to send Vendor master information through CREMAS to PI system. I am using change pointer and batch job to trigger RBDMIDOC and send IDocs.
In case the IDoc fails a mail needs to be triggered to concerned person giving vendor number, Idoc number and date. Can anyone suggest any user exit/BADI where this can be done ??
Note: system is 4.7C.Hi Chinmay
I didn't knew you were in 4.7. Since you mentioned about the details of the workflow getting triggered, here are the options i can think of.
In case of error it is triggering the standard task 00007989 which you can check in PFTC. This task calls the method ERRORPROCESS from Business Object IDOCAPPL. My suggestion here would be to create a subtype of BO IDOCAPPL in SWO1 transaction and add additional logic in method ERROR_PROCESS to send the mail. The details of the IDOC number and other things are available in the task container of TS00007989. But make sure you do it specific for your message type, as this will be triggered for all message types. And then change the BO and method reference in task 00007989 to point to your new BO method.
Other options would be to delegate the BO IDOCAPPL to a new Z BO, and then modify the method IDOCAPPL. This way you don't have to change the task BO assignment, as it will implicitly use the Z BO method. May be you can get in touch with your Workflow consultant who can help you more on this.
Regards
Ranganath -
ALE Change pointer idocs generated in wrong sequence
We are using the serialization group to generate the MATMAS and CLFMAS idocs with the sequence MATMAS generated first and then CLFMAS.
Normally,this seems to work fine with the idocs generated in the right sequence.
However, during a period of every 24hours, I could see a couple of MATMAS and CLFMAS idocs being generated in the WRONG sequence with CLFMAS generated first and not MATMAS as maintained in the serialization group.
What could be the reason?
I checked in the BDCP and BDCPV tables, the timestamps for the wrong sequence idocs seem to be correct with MATMAS before CLFMAS. However the actual idoc creation time is not in correct sequence.Hi,
Can you check your serialization group via tcode BD44 and check the sequence number for MATMAS and CLFMAS?
Hope this will help.
Regards,
Ferry Lianto -
How to relate IDOC generated in sap through ALE from legacy system
Hi all,
can any one tell me how can relate an idoc generated in SAP with the new idoc generated in a legacy system. I mean how could I identify, which idoc is generated for a particular idoc in legacy system and vice versa.
Thanks,
NilanjanaThanks Suhas but when i am getting error message related to partnr profile when pressing this 'TRACE IDOC' button even with idoc in status 53.
Edited by: nilanjana sinha on Nov 11, 2011 8:20 AM -
Credit Memo request with reference to Billing Document number via IDoc
Hi,
I want to create credit memo request with reference to billing document number via IDocs.
I have tried through ORDERS05, but when I process I saw that it is only processing with reference to contract number or quotation.
So is any other way of creating credit memo request creation with reference to Billing document number via IDocs?
Thank you in advance.
Regards,
SanthiPlease Help... it is Urgent... Thank you
-
Counting the number of IDocs in a package of IDocs in BPM
Hello All,
I need a solution where I need to count the number of EDI_DC40 segments (The IDoc Count) in a package of IDoc's. The following is the scenario
1) We are receiving a package of IDoc's in receive step using the XI File Adapter. I was wondering if there is a way that I can count the number of IDoc's in the BPM using a container operation or some other Method. I appreciate any help.
Thanks.HI,
We have two ooptions,
one as explained above , yu can use standard count function and that can be used.
Second one is we have count option in file adapter to count the msgs.
see the below link
http://help.sap.com/saphelp_erp2005vp/helpdata/en/0b/9a50465ccf84479e39a6d50c90fb3f/content.htm
Regards
Chilla -
Data upload:F-02: each documnet number to be generated for each line item
Dear ABAP experts,
I have a requirement.
When we uplaod customer or vendor invoices ,a document number will be generated or posted.
Similarly, my requirement is :When I do the same kind of uploads, for each line item in an excel file each document number has to be generated or posted .This upload is using Tcode: F-02.
How do I generate each document number for each line item (for each vendor or customer).
Please do the needful.Either send me a sample code or an idea how to proceed.
Thanks,
Hema.Hi,
using below code you can generate document number for each line Item.
PERFORM bdc_dynpro USING 'SAPMF05A' '0100'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
IF wa_final-field1 NE c_space.
convert date to user format
MOVE wa_final-field1 TO v_date.
CALL FUNCTION '/SAPDII/SPP05_CONVERT_DATE'
EXPORTING
if_date = v_date
IMPORTING
ef_date = v_date1.
PERFORM bdc_field USING 'BKPF-BLDAT'
v_date1. " Document Date
Clear v_date field
CLEAR: v_date1 , v_date.
ENDIF.
PERFORM bdc_field USING 'BKPF-BLART'
wa_final-field4. " Document Type
PERFORM bdc_field USING 'BKPF-BUKRS'
wa_final-field2. " Company Code
IF wa_final-field3 NE c_space.
convert date to user format
MOVE wa_final-field3 TO v_date.
CALL FUNCTION '/SAPDII/SPP05_CONVERT_DATE'
EXPORTING
if_date = v_date
IMPORTING
ef_date = v_date1.
PERFORM bdc_field USING 'BKPF-BUDAT'
v_date1. " Posting Date
Clear v_date field
CLEAR: v_date1 , v_date.
ENDIF.
PERFORM bdc_field USING 'BKPF-WAERS'
wa_final-field5. " Currency
PERFORM bdc_field USING 'BKPF-KURSF'
wa_final-field6. " Rate
PERFORM bdc_field USING 'BKPF-XBLNR'
wa_final-field7. " Reference
PERFORM bdc_field USING 'BKPF-BKTXT'
wa_final-field8. " Document Header Text
PERFORM bdc_field USING 'RF05A-NEWBS'
wa_final-field9. " Cr.Posting Key
PERFORM bdc_field USING 'RF05A-NEWKO'
wa_final-field10. " Cr.Vendorcode or GL Account
PERFORM bdc_dynpro USING 'SAPMF05A' '0302'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BSEG-HKONT'
wa_final-field11. " Dr.Alternative Recon A/c
PERFORM bdc_field USING 'BSEG-WRBTR'
wa_final-field12. " Dr.Amount in Document Currency
Begin of changes by someshwar
IF v_field5 NE 'jpy' OR v_field5 NE 'JPY'.
TRANSLATE v_field5 TO UPPER CASE.
IF v_field5 NE 'JPY'.
PERFORM bdc_field USING 'BSEG-DMBTR'
wa_final-field13. " Dr.Amount in Local Currency
ENDIF.
Changes end
PERFORM bdc_field USING 'BSEG-GSBER'
wa_final-field14. " Dr.Business Area
PERFORM bdc_field USING 'BSEG-ZTERM'
wa_final-field15. " Dr.Payment Terms
IF wa_final-field16 NE c_space.
convert date to user format
MOVE wa_final-field16 TO v_date.
CALL FUNCTION '/SAPDII/SPP05_CONVERT_DATE'
EXPORTING
if_date = v_date
IMPORTING
ef_date = v_date1.
*Begin of changes by someshwar
IF wa_final-field16 NE '00000000'.
PERFORM bdc_field USING 'BSEG-ZFBDT'
v_date1. " Dr.Baseline date
ENDIF.
*Changes end
Clear v_date field
CLEAR: v_date1 , v_date.
ENDIF.
*Begin of changes by someshwar
IF wa_final-field17 NE ''.
PERFORM bdc_field USING 'BSEG-ZLSCH'
wa_final-field17. " Dr.Payment Method
ENDIF.
*changes end
PERFORM bdc_field USING 'BSEG-ZUONR'
wa_final-field18. " Dr.Assignment
PERFORM bdc_field USING 'BSEG-SGTXT'
wa_final-field19. " Dr.Text
*Perform Save posting
PERFORM save_post.
ELSE.
PERFORM bdc_dynpro USING 'SAPMF05A' '0302'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BSEG-HKONT'
wa_final-field11. " Dr.Alternative Recon A/c
PERFORM bdc_field USING 'BSEG-WRBTR'
wa_final-field12. " Dr.Amount in Document Currency
*Begin of changes by someshwar
IF v_field5 NE 'jpy' AND v_field5 NE 'JPY'.
TRANSLATE v_field5 TO UPPER CASE.
IF v_field5 NE 'JPY'.
PERFORM bdc_field USING 'BSEG-DMBTR'
wa_final-field13. " Dr.Amount in Local Currency
ENDIF.
Changes end
PERFORM bdc_field USING 'BSEG-GSBER'
wa_final-field14. " Dr.Business Area
PERFORM bdc_field USING 'BSEG-ZTERM'
wa_final-field15. " Dr.Payment Terms
IF wa_final-field16 NE c_space.
convert date to user format
MOVE wa_final-field16 TO v_date.
CALL FUNCTION '/SAPDII/SPP05_CONVERT_DATE'
EXPORTING
if_date = v_date
IMPORTING
ef_date = v_date1.
PERFORM bdc_field USING 'BSEG-ZFBDT'
v_date1. " Dr.Baseline date
ENDIF.
Clear v_date field
CLEAR: v_date1 , v_date.
ENDIF.
PERFORM bdc_field USING 'BSEG-ZLSCH'
wa_final-field17. " Dr.Payment Method
ENDIF.
PERFORM bdc_field USING 'BSEG-ZUONR'
wa_final-field18. " Dr.Assignment
PERFORM bdc_field USING 'BSEG-SGTXT'
wa_final-field19. " Dr.Text
*Perform Save posting
PERFORM bdc_field USING 'RF05A-NEWBS'
'40'. " Cr.Posting Key
PERFORM bdc_field USING 'RF05A-NEWKO'
'999996'. " Cr.Vendorcode or GL Account
PERFORM bdc_dynpro USING 'SAPMF05A' '0300'.
PERFORM bdc_field USING 'BDC_OKCODE'
'BU'.
*& Form BDC_TRANSACTION
FORM bdc_transaction USING p_tcode.
DATA: l_v_string TYPE string.
REFRESH i_messtab.
CALL TRANSACTION p_tcode USING i_bdcdata
MODE g_mode
UPDATE 'S'
MESSAGES INTO i_messtab.
IF NOT i_messtab[] IS INITIAL.
READ TABLE i_messtab WITH KEY msgtyp = 'E'.
IF sy-subrc EQ 0.
LOOP AT i_messtab.
IF i_messtab-msgtyp = 'E'.
PERFORM fill_error_table USING i_messtab-msgtyp
i_messtab-msgid
i_messtab-msgnr
i_messtab-msgv1
i_messtab-msgv2
i_messtab-msgv3
i_messtab-msgv4.
ENDIF.
ENDLOOP.
v_error = v_error + v_count.
ENDIF.
READ TABLE i_messtab WITH KEY msgtyp = 'S' msgnr = 312.
IF sy-subrc EQ 0.
SELECT SINGLE * FROM t100 WHERE sprsl = sy-langu
AND arbgb = i_messtab-msgid
AND msgnr = i_messtab-msgnr.
l_v_string = t100-text.
REPLACE '&' WITH i_messtab-msgv1 INTO l_v_string .
PERFORM fill_error_table USING i_messtab-msgtyp
'ZMSG_FI'
'025'
i_messtab-msgv1
wa_final2-field2
v_success = v_success + 1.
ELSE.
LOOP AT i_messtab.
IF i_messtab-msgtyp = 'S'.
PERFORM fill_error_table USING 'E'
i_messtab-msgid
i_messtab-msgnr
i_messtab-msgv1
i_messtab-msgv2
i_messtab-msgv3
i_messtab-msgv4.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
CLEAR : t100 , l_v_string .
ENDFORM. " BDC_TRANSACTION
Regards,
Siva. -
Check Number not being generated
We do not have SAP Check printing functionality activated right now. So the checks will be handwritten. When i created the Payment Method for check, I assigned RFFOEDI1 in the payment medium program. I also created the check lot for that House bank and Company code in FCHI. I created a variant for RFFOEDI1 although i dont really need anything printed. Now when I am executing payment run, the payments are being posted fine. The check number is not being populated. I checked the Register (FCHN) and there are no entries. The Vendor has CHeck payment method in the master record and the payment method is also assigned as "Checks" in the Invoice.
Not sure what is wrong. Help is highly appreciated.Hi,
In case you use the check printing program from SAP, it will generate the check information and will assign to the documents automatically. However it is upto you whether you need to print the checks or not? But the check numbers have been generated by SAP. You can manually create the check for the payment documents matching those check numbers.
The only thing is that the manual control should be there so that the check is manually created with same number as system generated in payment run. (Otherwise, do not generate check in F110, rather create check manually and assign to payment document in FCH5.)
Regards,
Gaurav -
Purchase requistion number not been generated for material shopping carts
Dear Experts,
I am able to create a purchase requistion for text shopping carts once it is approved. For material if i create a shopping cart then status is showing approved(activated workflow without approval) but purchase requistion number not been generated.
It was happening suddenly...earlier i was able to generate PR for material shopping carts.
Please advise on this
Thanks
RavoHi Venkatesh,
Can you please give me the detail requirement. If you want generate a PR for catalogue items then you have to maintain the setting in SPRO_>srm->SRM SERVER->cross application basic settings-> define objects in backend systems...
Thanks
Ravi -
Usage of ALE - idocs generated for BAPIs
Hi
I need to use - the std idocs generated for BUS2032 object - CREATEFROMDAT2 method to store the BAPI call ( BAPI_SALESORDER_CREATEFROMDAT2 )data for those sales orders that could not be created.
If I want to use the SAP delivered BAPI ( BAPI_SALESORDER_CREATEFROMDAT2 ) to call as it within an ABAP program - and then if the call did not go through - then log the data for BAPI into the corresponding idoc with the message type SALESORDER_CREATEFROMDAT2 ( idoc type SALESORDER_CREATEFROMDAT202 ) do I need to move the values from the BAPI structures to the idoc segments programatically ? Or since the idoc is linked to the BAPI - by definition, is there an implicit way to move data to the corresponding idoc segments and save the idoc .
Can anyone out there give me a code sample to do - what I have asked above ?Hi,
I guess you can use function module ALE_SALESORDER_CREATEFROMDAT2 to create idoc from bapi data. You can pass the entire data in internal tables that you are passing to BAPI into above mentioned function module and then it will create an Idoc for the same. Also populate the receivers in the internal table receiver.
KR Jaideep, -
Hi All,
I am asked to create a file to IDOC scenario in PI. The problem is, the file will have around 200,000 records, 96MB. That means I have to get the 200,000 records from the file and create 200,000 PO IDOC at once. I know this is not possible. Does any one have this experience? How did you solve the problem?
Thanks a lot!
CharlesFew ways to implement this.
Though the file has huge number of records, you can tweak or control the number of idocs creating at the reciever side.
Refer michal blog for edit the occurence of target idoc structure to sent the number of idocs as per the need.
The specified item was not found.
https://wiki.sdn.sap.com/wiki/display/XI/File%20to%20Multiple%20IDOC%20Splitting%20without%20BPM
if your sender side is flat file then in the content conversion you set the parameter Recordsets per message like 100 or so.. so that you create 100 idocs each time from the sender message structure. Refer SDN forum for fcc parameters and sender fcc adapter scenario.
Refer this thread
Recordsets per Message in File adapter -
Maximum size of XML files and number of IDocs for IDoc receiver adapter
Hi Guys,
We have an XML file to IDoc scenario where XI picks up an XML file with multiple Customer records in it, it does a simple mapping and creates one DEBMAS06 IDoc per record in the XML file. All IDocs are sent in a single file in XML-IDOC format to IDoc adapter which then posts the separate DEBMAS IDocs to R/3.
a) What is the maximum size of XML files that XI can handle with mapping involved ?
b) What is the maximum number of IDocs in a single file that the receiver IDoc adapter can handle ?
The first time this interface runs almost 200,000 Customer records will be exported in one XML file.
Thank you.Hi,
Well it is difficult to find out the maximum Size of xml messgaes that can be processed by XI and also Maximum number idocs an recevier Idoc adapter can handle.
This totally depends on your production system loads and the limits can be set totally on trail & error basis..
In my heavy loaded production system, i found out that the maximum size of the successfull messages after processing by XI is around 75 MB (seen in transaction SXMB_MONI). Whereas messages with size around 100 MB went into error.
I havent encounter any such limits with respect to Idocs.
I would suggest that you divide your data into smaller chunks and sent it part by part instead of sending it all once since you data size is huge.
You can vary your batch size as per your system load.
Regards,
- Deepak. -
IDOC bundling number of idocs in one message
Hi
I am using IDOC bundling where I have one message with around 33,000 idocs inbound to PI. Can i break the number of idocs per message so that I can have 5,000 idocs in each message. Is there a paremeter that needs to be changed create a recordset of 5,000 idocs per message or less?
Also Can I do IDOC packaging when sending the above 33,000 IDOCs to SAP ?
Please advise.
Thanks,
TeresaHi Raj,
My connectivity is JDBC - PI - SAP.
I execute a stored procedure to pick up line items and do graphical mapping to conver to IDOCS. According to you the best way is to pick less line items at a time and conver to IDOCs?
Can i do IDOC packaging at sender side in my scneario though i am already doing IDOC bundling?
Thanks,
Teresa -
No request Idoc generated in BI
Hi Experts,
I'm trying to load transaction data into infoprovider but it's not getting through when i check in Moniters it's shows 'No request Idoc generated in BI'.
To resolve this issue then load data, what are the things need to be done.
Please drop your comments.
Thanks in advance.
SiriHello Siri ,
what is the source of the data flat file ,R/3 ?can you check whether data is reaching to PSA?is there any routine between?what you can do is go to the monitor click on the details and then go to the data package and simulate the data .then you will know where you got the problem.
Assigng Points = Thanks in SDN
Thankyou & Regards
Jai
Maybe you are looking for
-
Receiver mail adapter - Payload as a Text attachment
Hi, In my proxy to mail adapter scenario, when i want to send payload to email as a Text email, where i need to content conversion in XI (XML to Txt file) when i send payload, currently i am receiving as a XML file. I try to follow like Rushikesh Des
-
UTFDataFormatException, invalid byte 1 (�) of a 6-byte sequence
Hi I am trying to parse xml file using sax parser(xerces-c) . i am not able to fix this error : UTFDataFormatException, invalid byte 1 (�) of a 6-byte sequence. xml file: <?xml version="1.0" ?> <!DOCTYPE svc_result SYSTEM "MLP_SVC_RESULT_310.dtd" [ <
-
Can't Uninstall Flash CS3 Professional
Yes I've looked around the web and Adobe forums. There's a whole mess of things I'm trying to fix right now so I might as well start from top and keep it compact. Scroll down to where it says "Let's recap" if you wanna get a summary of my technical
-
Need to reset mouse prefs without using a mouse...
Can i reset the monitors and mouse prefs to defaults without using the preferences panel? I had to reset the right mouse button as the primary button to test something. I had forgotten that this mouse had installed it's own prefs panel and I made the
-
GR with MIGO against Scheduling Agreement
Hi, Please advise what are the (sequence of) steps involved in doing a GR (with MIGO) against a Scheduling Agreement. i.e. Step 1- I have created a Scheduling Agreement (ME31L) for a particular material. Step 2- I have defined the Schedule Line (ME38