IDOC Header Record

Our scenario is  File(s) ---> XI -
> IDOC
We are receiving 3 Different Files, with Employee information from 3 different Countries and using XI , the records will be posted into R/3. Each record from the file will be treated as an IDoc.
The File is going to contain the Header Record, followed by the Detail records.
The header record will determine from whom this file was sent and we need to map the header info with the Control record.
How can I achieve the above task of separating the Header Record and the other detail records in the Message Mapping.
I would Greatly appreciate the Help.

hi Karen,
if you target XML fill contain
one header and many details (which have to be transformed into many idocs) then you can do it in
1:N mapping
1 file N idocs
just map the header so that it occures many times
(as many as the details section)
if I understand your issue correctly
Regards,
michal

Similar Messages

  • IDoc to File with different file name and data based on the IDoc header dat

    Hi,
    I got a requirement to implement IDOC to file senario.  In this the Converted file should have the file name and file content based on IDoc Header data.  Means If one of the IDoc header field value is
    'A'  - then the file name recieved by reciever system should be 'A.txt' and with the columns A  B  C  D  F.
    'B'  - then the file name recieved by reciever system should be 'B.txt' and with the columns C  D  F.
    In both the case IDoc message type is same.
    Please suggest me what i need to do to achieve this.
    Thanks in Advance. ...
    Regards
    Sri

    Hi,
    As per my requirement, we need to create one file for each IDoc based on IDoc header data. SAP program generates 10 IDocs for each run. All 10 IDoc's message type is same.  Each IDoc has one header record with the file name. Base on the  name in the IDoc header record, file needs to be created with different columns and file name. Means..
    IDoc 01- Header Description contains 'A' - than file will be generated should have name as 'A.txt' and columns 'parent'  'child' 'descripion'.
    IDoc 02- Header Description contains 'B' - than file will be generated should have name as 'B.txt' and columns 'Name' 'Department' 'Description'.
    IDoc 10- Header Description contains 'J' - than file will be generated should have name as 'J.txt' and columns 'Order No'  'Materail' 'Description'.
    Hope this will give more clarity on my requirement. Please let me if you are still not clear on requirement.
    Thanks for your all help..
    Thanks & Regards
    Sreeni

  • How to send single person-records with HRMD_A Idoc and change Idoc header?

    Hello group,
    we have different companies in our SAP system (BUKRS). Now when an infotype is changed the changepointers are activated and using program RBDMIDOC we can send Idocs of type HRMD_A to f.i. files. In order to have these files distributed to different parties depending on BUKRS of the person we would like to have HRMD_A to deliver single records, an Idoc for each person and the Idoc header fields for variant and function should be filled so that the partner profile would distribute the Idoc to the partie.
    Is this possible? And if yes how?
    Regards, Léon Hoeneveld The Netherlands

    Transaction PFAL lets me trigger the Idoc manually, but with a job for RBDMIDOC this is automatically.
    I found fm RH_HRMD_BLOCK_SIZE in wich you can enhance the code to set the block size for an Idoc-type to 1.
    But now I still have to change the Idoc header with an enhancement of user-exit.
    HRALE00OUTBOUND_IDOC BADi does not have the functionallity.
    Regards, Léon Hoeneveld

  • PMW/ACH Vendor Payments - Batch Header Record (5) not in file

    We're trying to get PMW/ACH vendor payments up and running, and thought we were about ready to send a test file to the bank, but I've discovered we have no batch header (record type 5) in the file?
    We're configured to use the PMW.  I have checked and rechecked our configuration, but must be missing something?  We have payment methods and banks configured.  Variants defined and bank/master data set up on a few vendors for testing. Everything else seems to be working fine. A small test via F110 selects these vendors into the file for payment, prints advices, and posts FI documents in SAP properly. I have record types 1, 6, 8, and 9 in the file...but no 5 (Batch Header).
    Any guidance would be greatly appreciated.
    Thanks.
    Lisa Tanner

    Record 5 is defined by the Format Supplement in FBZP, Payment method/country. Here you will find 3 supplements CTX, CCD and PPD.

  • How to create sqlplus output spool to a flat file  with a header record

    Hi all,
    I've requirement to spool data from a table to a flat file along with column headings in the first row.I'm getting data but I need header record in the first row also?
    Thanks,
    Mahender.

    Hi, Mahender,
    If you give this SQL*Plus command before you start SPOOLing
    SET   PAGESIZE  50000then you can get the usual SQL*Plus column headings, and they won't repeat unless you have more than 50,000 rows of output.
    When I can't do that, I use PROMPT
    {spool}
    SPOOL foo.txt
    PROMPT empno ename job mgr ...
    SELECT empno, ename, job, mgr ...
    PROMPT will trim leading whitespace (unless you enclose it in quotes), but it will leave spacing between the columns alone.
    You could also do a separate query, where you select some literals from dual:SPOOL foo.txt
    SELECT ' empno ename job mgr ...'
    FROM dual;
    SELECT empno, ename, job, mgr ...

  • How to create a partner and header record using CRM_ORDER_MAINTAIN?

    Hi any one knows how to create a partner and header record using the function module CRM_ORDER_MAINTAIN??
    I tried to  create a record, but i only managed to create a header record and the partner record is not reflected in the transaction.  Why is that so? is there any indicator that i need to include?
    Thanks..
    Jen

    Hi Jen!
    I use this FM and it works perfectly.
    Use this to create a partner:
      gs_partner-ref_handle    = '0000000001'.
      gs_partner-ref_kind      = 'A'.
      gs_partner-ref_partner_handle = '0001'.
      gs_partner-partner_fct   = '00000001'.
      gs_partner-partner_no    = NO_PARTNER. "number of the partner, bu_partner
      gs_partner-display_type  = 'BP'.
      gs_partner-no_type       = 'BP'.
      gs_partner-kind_of_entry = 'C'.
    *  ls_partner_l-ref_handle    = '1'.
      gs_partner-ref_guid      = '00000000000000000000000000000000'.
      APPEND gs_partner  TO gT_partner .
      ls_input_field-ref_kind  = 'A'.
      ls_input_field-logical_key   = '0001'.
      ls_input_field-objectname  = 'PARTNER'.
      ls_input_field-ref_handle  = '0000000001'.
      ls_input_field_names-fieldname = 'DISPLAY_TYPE'.
      INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
      ls_input_field_names-fieldname = 'KIND_OF_ENTRY'.
      INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
      ls_input_field_names-fieldname = 'NO_TYPE'.
      INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
      ls_input_field_names-fieldname = 'PARTNER_FCT'.
      INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
      ls_input_field_names-fieldname = 'PARTNER_NO'.
      INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
      INSERT ls_input_field  INTO TABLE  gt_input_fields.
      clear ls_input_field-field_names[].
      CALL FUNCTION 'CRM_ORDER_MAINTAIN'
      EXPORTING
    *    it_schedlin_i   = gt_schedlin_i_com
        it_partner      = gt_partner
    *    it_sales        = gt_sales
    *      it_orgman       = gt_orgman
    *      it_appointment  = gt_appointment
    *      it_ordprp_i     = gt_ordprp_i
    *   it_product_i    = gt_product_i
    *      it_activity_i   = gt_activity_i
    *      it_pridoc       = gt_pridoc_com
      CHANGING
        ct_orderadm_h   = gt_orderadm_h
    *   ct_orderadm_i   = gt_orderadm_i
        ct_input_fields = gt_input_fields.
    *      ct_doc_flow     = gt_doc_flow
    *      cv_log_handle   = gv_log_handle.
    Hope it helps u,
    Regards,
    Mon.

  • What is the use of EIN_FEDERAL and EIN_STATE_LOCAL fields in Voucher header record (PeopleSoft AP) ?

    What is the use of EIN_FEDERAL and EIN_STATE_LOCAL fields in Voucher header record (PeopleSoft AP) ? And where can we check record field related information in PeopleBooks ?

    Hi User,
    The best place to search for questions like this one is OTN, Oracle Technology Network. If you have any question about CLOUD and partnering with Oracle we will be more than glad to help! Thanks.

  • Populating MESFCT and MESCOD in IDOC control record through XI.

    Hi Experts,
    I want to map only MESFCT and MESCOD fields to IDOC control record as i see help.sap.com and all forums this part in XI is very confusing, as mentioned in the below thread i disabled all the mandatory fields(which are in red color)  in the EDI_DC40 and mapped MEDCOD and MESFCT with constants and in IDOC receiver adapter (Communication channel) i have checked the option (Apply Control Record values from Payload) , now i can see both the values MEDCOD and MESFCT  in XI payload, however I'm unable to see them in the target (ECC 6.0) system
    Threads Used:
    /people/sravya.talanki2/blog/2005/12/02/manipulating-idoc-control-records-from-payload
    /people/michal.krawczyk2/blog/2005/09/01/xi-idoc-adapter--edidc40--demystified
    SAP Note : 728792
    Target System
    WE09
    IDOC control record structure.
    Under Typinfo tab:
    Message Varient : <Still Empty>
    Message Function : <Still Empty> not populated from XI payload.
    Any guess ??? will there be any configurations required from ECC point of view to populate these values from XI payload.
    Thanks in advance
    Kelli.

    You mentioned that the payload values are visible post mapping during runtime so ,
    Try to edit the IDoc adapter once again and ensure that
    you have set the Apply Control Record Values from Payload indicator in the receiver IDoc adapter
    Activate the adapter and try again.

  • File- XI- IDoc: Idoc header data not saved correctly

    Hi guys!
    I have a very strange problem:
    I have a file to xi to IDoc scenario. Everything seems to be fine, IDoc is created in target system, but with strange error: <MESCOD>XX</MESCOD> segment is not written in IDoc header segment. This segment is available in message sent to ECC (after mapping), so there is no problem with ommiting the segment in mapping. But it's not saved. 
    This scenario worx fine in QA, but not in PRO.
    Any ideas, what to look at?
    Thanx  a lot! Olian

    Hi,
    check the IDoc which was in PROD. and see the ibound status and actual reason .
    depending upon the actual status you can resolve the issue.
    Chilla

  • UDF - Removing Header Record from File

    Hi Team,
    In my file(File Content Conversion) to ABAP server proxy scenario...
    The source File structure is like this...
    KUNNR|Matnr|Description----->(This is Hearder Record.Each File contains this header record.)
    1001|0077321|Special Materials
    1002|0077323|Raw Material
    File adapter will picks the file , In Message Mapping The first record is the Header Record from the above file structure.So I need to remove the Header Record.
    Can we handle  this requirement with any FCC parameter ;I think we can do it with the help of UDF in MessageMapping?
    Can anybody ghelp me the sample code for this.
    Thanks.
    Drumi

    Hi,
    You can use Document Offset in FCC to  specify the number of lines that are to be ignored at the beginning of the document.
    Regards,
    Priyanka

  • Error : idoc xml record in segment attribute instead of SEGMENT

    hi friends
    can any one solve my problem. In message mapping I mapped with a IDOC. In message mapping I Mapped all the fields. Still I am getting the error as "IDOC XML RECORD IN SEGMENT ATRIBUTE INSTEAD OF SEGMENT" I dont know about this error.
    can any one solve this problem please . I am doing this scenario since 5 days. help me..
    thanks in advance
    Vasu

    Hi Vasudeva,
    Can you pls provide little more details on the scenario ?
    Also at which place are you getting this error ?
    Assuming that you have created a message mapping for some source message to target IDoc message, here are some suggestions.
    1) Test the message mapping. (are you getting the error in testing itself ?)
    2) Apart from mandatory fields' mapping, are there any constants to be assigned to some IDoc fields ? Or any node to be disabled ? Or any such additional things...
    Regards,

  • SM58 - IDoc adapter inbound: IDoc data record table contains no entries

    Trying to send Idocs from SAP ECC6.0 via PI 7.0 up until 2 days ago there was no problem.
    Since yesterday, only one specific type of Idoc does not make it into XI (PI). In the Idoc monitor (WE02) the idocs that were created gives status 3 which is good. But all Idocs of that specific type (ZRESCR01) does not go to XI. I can only find them bakc in SM58 where it gives the following message:
    IDoc adapter inbound: IDoc data record table contains no entries
    I have checked SAP notes 1157385 and also 940313, none of them gives me any more insight into this error. I have also checked all the configuration in WE20, SM59, and in XI (repository and directory) and in XI IDX1, IDX2 but could not find anything that would cause this. I can also not think of anything that changed since 2 days ago.
    Please point me in the right direction.

    hi,
    i think in sm 58 u can find entries only when there is some failure in login credential .
    if there is change in IDoc structure than you have to reimport the idoc metadata defination at IDX2.otherwise not requird.
    please check the logical system name pointing to the your requird target system....
    please also verify thet your port should not be blocked.
    pls find the link it may help
    Monitoring the IDOC Adapter in XI/PI using IDX5
    regards,
    navneet

  • Content Conversion issue for header record

    Hi,
    We have a very urgent question on an issue here with one of our XI objects. 
    This is an inbound interface from an external system into R/3 & BW.  The inbound file has a header record (with about 8 fields) and detail records (about 900 fields per detail record). Data going into R/3 & BW don't have header records and everything goes in as detail records. One field from the header of this source file should be passed to the target structure at the detail level. Also, we are NOT using BPM.
    Can someone help us how we could define the file content conversion parameters for File adapter.
    Thanks in advance ......
    Prashant

    I'm so sorry, I wasn't subscribed to this thread and I didn't realize there were responses.
    If you have a message type made up of a Header with 1 occurence and Detail with 1 to unbounded occurunces, you'd want to do the following in content conversion:
    Document Name - your message type
    Document Namespac - your message type namespace
    Recordset Structure - Header,1,Detail,*
    Recordset Structure - Ascending
    Then you'll need to set some of the parameters, depending on the layout of your incoming file. 
    As for the problem of having hundreds of fields, I'm less sure about that.
    Would it be possible to break your detail data type down into smaller data types.  Each with fewer fields.  You'd still have to maintain every field in content conversion, but at least they'd be in seperate parameters, instead of all 900 in one tiny box.
    Here's a very rough example of what I mean:
    If you have 900 fields, instead of making 1 data type of detail, you could make 9 data types, Detail1, Detail2, Detail3, Detail4, Detail5, Detail6, Detail7,Detail8, Detail 9, each with 100 fields in them (or more with even less fields).
    Setting things up the file content conversion would be more complex in this scenario, so it might be a toss up if it's worth it to break it up this way or not if it meant configuring quite a few more parameters.
    For example,
    You'd have to declare your recordset structure like Header,1,Detail1,,Detail2,,Detail3,* etc, and you'd have to make sure to set the .endSeparator to '0' for all of the first 8 details, so it would recognize that they were all on one line.
    I hope this helps a little bit.

  • Flat file export with a “Constant” header record???

    I have a mapping that export the records of a table in a Flat File.
    But I need to agreggate a constant in the first line of the export file (Header Record)
    For example ‘AAABBBCCCDDDEEEFFFGGG’
    How Can I put a “Constant” Header record?

    Marcelo,
    When you use flat file as a target you can set the header to be your field names. Now... it looks like this is not exactly what you are looking for.
    Alternative is to use a pre mapping procedure to create your file with the one line in it, and have the mapping produce additional records that are appended to the first line. Whether you create a new file or append to an existing file is a property on the target file, if I am not mistaken (it would be a configuration property otherwise).
    Thanks,
    Mark.

  • Header Record not repeated when detail records span to more than a page

    In RTF template,
    1. I have a for-each with code of
    <?for-each@section:G_HEADER?>
    2. Under 'for-each', I have the header record is defined in a 1 table row.
    The row property for this table is set to 'Repeat as header row at the top of each page'
    3. Under this I have another table with fields for LINES data with its own 'for-each' code <?for-each:G_LINES?>
    4. Followed by end for the above two 'for-each'
    However, when I generate the PDF output from Preview, when the lines data spans to more than one page, the header record is not repeating on the subsequent pages. Anyone has any ideas how to fix this
    My XML Publisher version is 10.1.3.4.1 Build 130. I have a sample data and the template, but not sure if I can upload here.

    user6098416 ,
    I am also facing the same Problem as yours.
    My Template layout is as follows:
    <?for-each:G_HEADER?>
    Header table
    <?for-each:G_DTL1?>
    detail table  -->  (<?for-each:G_DTL2?> Detail Fields <?end for-each?> )
    <?end for-each?>   --> End for each for G_DTL1
    <?end for-each?>   --> End for each for G_HEADERMy problem is Header Table is not repeating on each page when detail Table data goes beyound one page.
    I tried the following but its not working:
    <?template:header?>
    Header table
    <?end template?>
    <?for-each:G_HEADER?>
    <?call@inlines:header?>
    <?for-each:G_DTL1?>
    detail table  -->  (<?for-each:G_DTL2?> Detail Fields <?end for-each?> )
    <?end for-each?>   --> End for each for G_DTL1
    <?end for-each?>   --> End for each for G_HEADERI am not sure whats wrong here.
    Thanks
    Sandeep

Maybe you are looking for