Content Conversion: Header and Item
Hi everybody,
as the parameters are not explained detailed, I have to ask you:
I have a file as follws:
SENDER;RECEIVER //this line occurs only once
1111;2222 //this line occurs only once
ARTICELNUMBER;AMOUNT//this line occurs only once
444;10//this line occurs unbounded
555;20
The result should look like this (line 1 and 3 have to be ignored!)
<ORDER>
* <HEAD>*
* <SENDER>1111</SENDER>*
* <RECEIVER>2222</RECEIVER>*
* </HEAD>*
* <ITEM>*
* <ARTICELNUMBER>444</ARTICELNUMBER>*
* <AMOUNT>10</AMOUNT>*
* </ITEM>*
* <ITEM>*
* <ARTICELNUMBER>555</ARTICELNUMBER>*
* <AMOUNT>20</AMOUNT>*
* </ITEM>*
</ORDER>
What parameters and which values do I need?
Thanks a lot,
Regards Mario
Hi,
Check some links on FCC,hope they may help u out.
File content conversion sites
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
Regards,
phani
Similar Messages
-
Sender FILE Adapater Content Conversion: Header and Item Data
Hi
I need to pick a file and do the content conversion. The XML structure which should be formed should be in the below format. I have a CSV file which needs to be converted.
Kindly suggest how can I maintain parameters for Header and Item level data in Recordset structure.
How can I specify in Recordset parameter which is Header(Customerno, Doc type and Address) and Item level(Line Item) data.
<?xml version="1.0" encoding="UTF-8" ?>
<customernumber></customernumber>
<documenttype></documenttype>
- <Address>
<name1></name1>
<name2></name2>
</Address>
- <LineItem>
<material>100016</material>
<amount>1000</amount>
</LineItem>Hi Swetank,
The file after conversion should have one Header and you can have any number of line items.
Once you choose File Content Conversion in the message protocol header while configuring the Sender File Adapter, you get the following enteries in the Content Conversion Parameters:
Document Name
Document Namespace
Document Offset
Recordset Name
Recordset Namespace
Recordset Structure
Recordsets per Message
Key Field Name
To maintain the Header information, Some entries are mandatory, i.e.
Recordset Name: Here please specify the name of the structure. It is included in the XML schema.
Recorset Structure: Here you need to enter the sequence and the number of substructures. Since Header is one but you can have many Line items, you will write:
customernumber,1,documenttype,1,Address,1,LineItem,*
this format is clearly explained in the link provided by Divya.
And in the Additional fields you need to write the name of fields corresponding to different Recorset Structures and also add some property to it, like fixed lengths, use some separators etc.
and Most important field is:
Key Field Name: If you specified a variable number of substructures for Recordset Structure, in other words, at least one substructure has the value *, then the substructures must be identified by the parser from their content. This means that a key field must be set with different constants for the substructures. In this case, you must specify a key field and the field name must occur in all substructures.
Here you need to enter LineItem as it is the only Recordset Structure with an *.
I hope this solves your problem,
Thanks and Regards,
Varun Joshi -
File Reciever content conversion header line
Hi all,
I want to convert a XML to a CSV-file using file reciever adapter.
Doing this I want to add the
The parameter for content conversion:
recordset: ET_AWB,item
parameter list:
item.addHeaderLine = 1
item.fieldSeparator = ;
ET_AWB.addHeaderLine = 1
ET_AWB.fieldSeparator = nl
The file is created successfully but the header line is not writen. Could it be that the header line is only created if the recordset is a single type?
Can anybody help me?
Thanks a lot!
FlorianHI all,
thanks for the information!
My scenario is a RFC-Message with more than 1 table which is mapped into several RFC-Messages (Message split).
Because I use RFC-functions for mapping I do not want to change the XML because then I would need an own DT/MT.
Probably because the record type is not a single recordset it doesn't function.
Unfortunately also the option from Prakash with explicitely defined header names doesn't function. Has anybody one more idea? Or is this what I want to do impossible?
Thanks a lot!
Florian -
Header and Item Odata through SEGW
Hi,
I know that this Topic was raised million times, but still raising this query. I have already consulted http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0d92637-3d0d-2f10-ebb2-efc1f40a85e8?QuickLink=index&… link.
Requirement: Create Header and Item Odata THROUGH SEGW.
Steps I have followed:
1. Created Header and Item Structure and have added them in the Export Parameters of an RFC.
2. Created the RFC and have populated the the internal tables corresponding to the Header and Item structures.
3. Go to Transaction SEGW and Imported the Header from the RFC. Then created Read and Query mapping for Header.
4. Go to Transaction SEGW and Imported the Item from the RFC. Then created Read and Query mapping for Item.
5. Created an association between "ID" of Header with "ID" of Item. Cardinality- 1:N
Observation:
Now when I run the Odata and execute /sap/opu/odata/sap/ZTEST_SRV/HDRSet(2)/ITEMSet, I get all the Items from the Item table for Each and every Header. But I guess for every header corresponding Items should have been enlisted.
Is there any step that I am missing?
Important: In the MPC class(ZCL_TEST_MPC), I could see a method named DEFINE_ASSOCIATION. I have put an external Breakpoint in it, but this breakpoint is not triggered.
-Regards
DhrubajyotiHii Dhru,
In addition to the steps followed, you have to create navigation property using association created.
You have to implement Get_expand_entityset method in DPC method for multiple headers and corresponding items and for single header and corresponding items you have to implement GET_EXPANDENTITY method.
The URL is as format below :
/sap/opu/odata/sap/<service name>/<Header entity set>/?$expand=<navigation property from header to item>&$filter= eq '<ID>' '<value>'
Example URL : https://<server>:<port>/.../<service_name>/SalesOrders?$expand=SalesOrderItems
For reference :
https://help.sap.com/saphelp_gateway20sp08/helpdata/en/ca/c683e803494b77a2e1290b987556e2/content.htm
When GET_EXPANDED_ENTITYSET method invoked
For get_expanded_entity_set method implementation please refer the below URL
http://scn.sap.com/community/gateway/blog/2014/07/18/implementing-expand-entityentity-set
Regards,
Lokeswar Reddy byni. -
How to distinguish between the header and item data from the given legacy excel file, so that I can correctly extract the Sales Order header and item level data while doing LSMW? Do we need to do any extra coding for doing that?
Hi Diwakar,
Please read below. This is the way to do it. It resolved my issue.
Hi, I think you can use 1 file but with the record type identifier, the field will appear in all source strictures, in the Maintain Source Fields step amend field (double click) on it and point Identifying Field Content to appropriate level, e.g. 1 for header 2 for item. Your input file will look like:
REC_TYPE .. FIELDS
1 only fields relevant for the header and blanks for line items
2 only fields relevant for the item data blanks for header fields
2
2
1 Next record header
2 next record item 1
2 next record item 2
1
2
2
2
2
1
2
Diwakar,
Please dont be oversmart and dont mislead people and hurt others by making nasty comments.
Thanks,
Raj. -
FCC parameters for header and item
Dear All,
I am working on a File to RFC scenario. The file has the PO deatils from which Salesorder has to be created in R/3. Am using the BAPI BAPI_SALESORDER_CREATEFROMDAT1 to create salesorders. I have tested the scenario with XML message - it is working file .
The problem is with FCC.
The structure of the file is as follows
PO number,podate,deliv. date,cust. material,quantity,receiving point
message type:
-->MT_messagetype
>input
>header
po number
po date
deliv date
>item
>item
cust_material
quantity
receiving point
>partner
>partner
dummy field.
input is the recordset
i have to get the first 3 fields from the file inlto header and the rest into item.
i have created a dummy field in partner because I am mapping a constant value to sold to party in partner node .
what should be the FCC parameters ?After looking at your structure which is comma separated and doesn't have any keyfields it will be difficult to content convert it into different nodes like header and item.
I was looking at using fixed field lenght's along with field separator to split the structure, as the first 4-5 fields of u r row seem to be standard structures which will have fixed length, but then your last field "receiving point" is not a of fixed length.
so as long as my understanding goes you will have to content convert the input into a flat xml structure like this:
<input>
<header>
</po number>
</po date>
</deliv date>
</cust_material>
</quantity>
</receiving point>
</header>
<input>
Recordset name - input
Recordset structure --header,*
FCC
header.fieldNames -- po_number,1,po_date,1,deliv_date,1,cust_material,1,quantity,1,receivingpoint,1
header.fieldSeparator -- ','
header.endSeparator -- 'nl'
Since in your scenario looks like you are creating one sales order per row of file, the above structure should do the job for you.
Cheer's -
How to create a new field for Q3 - QM notification in Header and item level
Dear All,
l
Sub: How to create a new field for Q3 - QM notification in Header and item level
Ref. the link --> Quality Notification
We want to create a new field in header level and item level.
As per the thread the solution is given below.
In the IMG Config: Quality Management -> Quality Notification -> Notification Types -> Define screen areas for notification types Then Choose 'Define screen areas' Then Click on 'New entries' button Now, select the relevant Notification Type and click in 'Enter'. Select the 'Iten Cases' register and remember to setup the Tabstrip Header, Icon, etc. Set the 'Tabstrip active' flag. Then Save.
Quality Notification -> Notification Types -> Define screen areas for notification types
WE ARE UNABLE TO FIND IN CUSTOMIZATION PATH --> DEFINE SCREEN AREAS FOR NOTIFICATION TYPES.
Please help.
Question No. 2 :
THE REQUIREMENT IS GIVEN BELOW.
We want to hide the field in Q3 - QM Notification
In header --> Reference tab --> Item (sub heading) --> "DEFECT LOCATION" FIELD TO BE ELIMINATED (HIDE)
Ref the link --> Quality notification
The solutiion is given below.
Hi Sami,
We can hide the collumns using the Transaction OQM1 and Program Name SAPLIQS0.
Lets say Defect location need to be hidden, the field TXTCDOT need to have the radio button HIDE.
Hope this will suffice your requirement.
Kindly ask me if you need any other details.
Thanks & Regards,
Srinivas.D
Hi Sami,
We can hide the collumns using the Transaction OQM1 and Program Name SAPLIQS0.
Lets say Defect location need to be hidden, the field TXTCDOT need to have the radio button HIDE.
Hope this will suffice your requirement.
Kindly ask me if you need any other details.
Thanks & Regards,
Srinivas.D
By double clicking the "DEFECTIVE QUANTITY (EXTERNAL), WE COULD NOT GET --> field TXTCDOT .
Plese do the needful.
We are using ECC6.0 Ehp3 and Ehp4.
With Best Regards,
Raghu SharmaDear Pushpa,
Transaction Code :SHD0 is working fine.
Please accept my sincere thanks for your sharing your Knowledge.
I am able to fulfill my
Regarding the enhancement, I have not tried.
Once I will complete, I will award the fulll marks to you.
With Best Regards,
Raghu Sharma -
Incompletion Log V50UC EXCTR inconsistency at Delivery header and Item lev
Hello Experts
Incompletion Log V50UC EXCTR inconsistency at Delivery header and Item lev
This fields and structure is defined both at header and Item Incompletion procedure .
But at Header level , the field is getting removed , but not at Item level
V50UC- EXCTR.
Can you let me know what to do about this inconsistency / any SAP Note etc .
REgards
RohitHello
This Incompletion log is related to Foreign Trade.
Check maintain required foreign trade data at Item
or If foreign trade is not active for your this business process..Check your config for Incompletion procedure for foreign trade by use TCode VI29.
I hope this suffice your requirment.
Thanks & Regards
JP -
Header and Item Text is not replicating from ECC6.0 to SAP CRM 7.0
Hi SAP Experts,
When the text is added at header and item in Texts tab from SAP CRM then this is transferring into ECC6.0 but the otherway round is not working i.e., from ECC6.0 to SAP CRM.
Would appreciate for giving solution.
Thanks in advance.
Best Regards
SucchiHi Succhi
There are a number of oss notes to check: 1169856, 720147, 550343, and 549209
Please make sure that the text tables are included in the filter as per note 720147.
Also include the configuration as per note 549209.
It is necessary that the same text types exist in both systems so please review the configuration carefully.
I hop this helps.
Best Regards
Gavin -
Partners in Header and Item level
Hi,
I am creating a credit memo through the following steps.
1. Create rebate agreement in VBO1.
2. Create sales order in VA01.
3. Release through VKM4.
4. Create delivery through VL01n.
5. Post goods issue.
6. Create billing document through VF01.
7. Update billing doc through VBOF.
8. Settle rebate agreement through VB(7.
When the credit memo is created,in debugging mode(VB(7),if I change the partner for "header", partner for "item" is also getting changed.This is as per my requirement. But I wanted to know whether there can be a case where item partners are different than header partners. (Right now I am having only one line item in credit memo.I am not being able to create a credit memo with more line items by repeating all the steps above).Sowrabha
It is possible to have different Partners for Header and Items... However, in your scenario it doesn't create any problem, as it all depends on the Partner Determination Procedures in the customising....
Thanks
Amol Lohade -
Delivery tolerance at header and item level in sales order
Dear All,
My client wants to maintain delivery tolerance at both header and item level. NOTE: The tolerance at sales order header is different than the delivery tolerance at sales order item.
eg if i maintain 3% plus and minus tolerance at item, the header level tolerance can be 2%.
Also if there are more than 1 line items, the system should give warning message, when it finds that the delivery tolerance at item level can be maintained but that of the header level cannot be maintained and vice varsa.
Awaiting an early help and thankful for the same in advance.
Regards,
Avnesh KamdarHi Avnesh,
Delivery tolerance can be made in the customer master,sales org data ---delivery tab.
Delivery tolerance is always at item level.
Reward points if it helps.
Regards
Karan -
How to header and item data of sales order using bapi interface
hi friends,
i am geetha, i having a problem like how to upload sales oder header and item data through va01 tcode using BAPI FUNCTION MODULES.
i need bapi function modules for header adn item data and brief explation on that , how to pass importing and tables parameters to get exact output .
regards
geetha.Use : BAPI_SALESORDER_CREATEFROMDAT2
Sales order: Create Sales Order
Functionality
You can use this method to create sales orders.
You must enter at least sales order header data (via ORDER_HEADER_IN structure) and partner data (via the ORDER_PARTNERS table) as input parameters.
Enter the item data via the ORDER_ITEMS_IN table. You can allocate item numbers manually, by filling in the relevant fields, or the system does it, according to the settings for Customizing, by leaving the relevant fields blank.
If you have configurable items, you must enter the configuration data in the ORDER_CFGS_REF, ORDER_CFGS_INST, ORDER_CFGS_PART_OF and ORDER_CFGS_VALUE tables.
Credit cards can be transferred via the BAPICCARD structure, on the one hand, data for card identification, on the other, data for a transaction which has taken place in an external system.
Once you have created the sales order successfully, you will receive the document number (SALESDOCUMENT field). Any errors that may occur will be announced via the RETURN parameter.
If no sales area has been created in the sales order header, then the system creates the sales area from the sold-to party or ship-to party, who has been entered in the partner table. If a clear sales area cannot be created, you will receive a system message, and the sales order will not be created.
Notes
1. Mandatory entries:
ORDER_HEADER_IN : DOC_TYPE Sales document type
SALES_ORG Sales organization
DISTR_CHAN Distribution channel
DIVISION Division
ORDER_PARTNERS..: PARTN_ROLE Partner role, SP sold-to party
PARTN_NUMB Customer number
ORDER_ITEMS_IN..: MATERIAL Material number
2. Ship-to party:
If no ship-to party is entered, use the following: Ship-to party =
sold-to party.
3. Commit control:
The BAPI does not have a database commit. This means that the relevant application must leave the commit, in order that can be carried out on on the database. The BAPI BAPI_TRANSACTION_COMMIT is available for this.
4. German key words:
The following key words must be entered in German, independantly of
the logon language:
DOC_TYPE Sales document type, for example: TA for standard order
PARTN_ROLE Partner role, for example: WE for ship-to party
Further information
You can find further information in the OSS. The note 93091 contains general information on the BAPIs in SD.
Parameters
SALESDOCUMENTIN
ORDER_HEADER_IN
ORDER_HEADER_INX
SENDER
BINARY_RELATIONSHIPTYPE
INT_NUMBER_ASSIGNMENT
BEHAVE_WHEN_ERROR
LOGIC_SWITCH
TESTRUN
CONVERT
SALESDOCUMENT
RETURN
ORDER_ITEMS_IN
ORDER_ITEMS_INX
ORDER_PARTNERS
ORDER_SCHEDULES_IN
ORDER_SCHEDULES_INX
ORDER_CONDITIONS_IN
ORDER_CONDITIONS_INX
ORDER_CFGS_REF
ORDER_CFGS_INST
ORDER_CFGS_PART_OF
ORDER_CFGS_VALUE
ORDER_CFGS_BLOB
ORDER_CFGS_VK
ORDER_CFGS_REFINST
ORDER_CCARD
ORDER_TEXT
ORDER_KEYS
EXTENSIONIN
PARTNERADDRESSES
Exceptions
Function Group
2032 -
Different division at header and item level in Order
Hi Gurus,
i am facing this issue where while creating quotation in CRM i entered sold to party, selected the org data ( OA/DI/OP ). i entered the product with quantity. now at item level in Organization tab my sales area is showing as ( OA/DI/01). system is picking the division maintained for product which is 01) so division is different at header and item level. i need the header division to be used at item level as well.
how can i achieve this?
Thanks and Regards
Sudhir GroverHi Sudhir,
Make sure the settings in the SPRO>CRM>Master Data>Products>Special Settings for Sales Operations--> Define Division settings is activated with Header Div. Act.
Also check the details in the IMG activity documentation for define division settings.
Hope this helps.
Regards,
Chandrakant -
Display constant values in header and items from table in ALV
Hello all,
I have to dispaly the header and Item entires in the output . and the point is header values are all constant and they are not related to item data . item data is to dispalyed from VBAP table .
so how can i achive this .. can i use this FM REUSE_ALV_HIERSEQ_LIST_DISPLAY ...
example of outpput..
Header inforamtions..
name city areacode areazone postzip
abcde xyz 1244 abc 123456
and the item details should be right below the header details
Cnt Vbeln vkorg vtweg matnr etc etc
1 xxx xx xx xxxx xxx xxxx
2 xxx xx xx xxxx xxx xxxx
3 xxx xx xx xxxx xxx xxxx
4 xxx xx xx xxxx xxx xxxx
5 xxx xx xx xxxx xxx xxxx
6 xxx xx xx xxxx xxx xxxx
I am able to dispaly the line items with the FM 'REUSE_ALV_GRID_DISPLAY' plz advice the best solution to achive this
thanks
Raj
Edited by: abaprthree on Oct 28, 2009 12:30 PMHi,
For this you will need to define header for the ALV. Here is a simple example how to do this:
First you need to write one Header form like following:
FORM f004_header USING it_head TYPE slis_t_listheader..
DATA : wa_line TYPE slis_listheader.
CLEAR wa_line.
wa_line-typ = 'H'. " H = Header, S = Selection, A = Action
wa_line-info = 'List of Sales Orders'.
APPEND wa_line TO it_head.
" Here type out all the required data one by one in work are and append it to internal table
ENDFORM. "f004_header
before calling REUSE_ALV_GRID_DISPLAY you need to call following
TO HEADER EVENT
FORM f006_top.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_header.
ENDFORM.
and for REUSE_ALV_GRID_DISPLAY call as following
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_top_of_page = 'F006_TOP'
it_fieldcat = t_fieldcatalog[]
TABLES
t_outtab = it_data.
Let me know if any other help is needed. -
How to get header and item data in ME_PROCESS_PO_CUST ?
Hi all,
How can I get header and item data in me_process_po_cust~process_account ? I have to do some validation for account assignment catagory in item overview.Hi ,,
Further make the following changes in method IF_EX_ME_PROCESS_REQ_CUST~PROCESS_ITEM.
Get Line item data using method:
CALL METHOD IM_ITEM->GET_DATA
RECEIVING
RE_DATA = W_ITM_DATA.
and then validate the item data from structure W_ITM_DATA..
Same as follows for Header Records:
In method IF_EX_ME_PROCESS_REQ_CUST~PROCESS_Header.
Thanks
Shambhu
Maybe you are looking for
-
i have a xml like this <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="st.xsl"?> <Workflows> <Workflow Completed="COMPELETED" Name="CRMODWF6027"> <Actions> <Action Completed="COMPELETED" Name="SendMailAction">
-
The same basic question has been asked numerous times over recent years for iWorks/Numbers on OS X/iOS: "Can you use macros?" The answer is always "No." In my case, it's the current version of Numbers for iOS 7. Would some then explain how the temp
-
Sometimes when I have multiple tabs open and click on one it closes and opens in a new window. Sometimes I like this behavior, but have no idea how it happens.
-
import com.sapportals.portal.security.usermanagement.IUser; is deprecated Is there any alternative???
-
Aperture or Final Cut Pro X for Video Org
I don't really see a reason to keep importing (linking) videos into Aperture at this point, considering the robust meta data capabilities of Final Cut Pro X. Other than having all video and photos in one place (Aperture database), does anyone have a