Select without key fields
Hi,
I have a question, How to select documents when we dont have key fields in the selection
Sales orders
eg If we have 3 fields Material , Customer and Sales Org, which are not key fields in table VBAK, What is the best approach to select Sales Documents based on these 3 fields.
please let me know
Thanks
Hi
Use logic like below.
SELECT vbakVBELN vbakVKORG vbapMATNR vbakKUNNR
INTO TABLE T_VBAK
FROM VBAK INNER JOIN VBAP
ON VBAKVBELN = VBAPVBELN
WHERE VBAK~VKROG IN S_VKORG AND
VBAP~MATNR IN S_MATNR AND
VBAK~KUNNR IN S_KUNNR.
Thanks
Ramakrishna
Message was edited by:
Ramakrishna Ramisetti
Similar Messages
-
File Content conversion at the sender adapter without Key field
Hi All,
I have a requirement ....We are using Message Transform Bean at the sender adapter (we are not going for FCC as we are tranforming a decryption) ..its is a flat file...
we dnot have a key field for one of the node .....we have total 5 nodes under parent node and one of the node does not have key field ....
NOTE: I guess we have to do either Java mapping or XSLT ..but not getting proper weblogs with program...
and not well versed with coding...i got few codes which were either not fulfilling requiremment or they use stream tranformation where it is decaprecated in NWDS and does not allow to compile it properly .
Can somebody get me a code for Java which uses Abstract tranformation ...which can full fill below requirement
parent node
Node1
node 1a
node 1b
Node 2
Node 3
Input Flat file is in below format
example:
Employee Headre Flat files
Employee Detail Flat Files(this repeates numerous times as much as number of employees)
Employee Trailer Flat Files
Loan Headre Flat files
Load Detaisl Flat Files (this repeates numerous times as much as number of employees)
Loan Trailer Flat files
Assitance much appreciated thanks .
Regards
KiranHi Stefan,
I will rephrase the question i guess its communication gap...
1) we have an existing interface in 3.0..we are not copying the same interface to 7.1 as it was not according to standards and they are phasing out that system.
2) In 3.0 they are reading the Flat files under one record .. the structure is as follows:
Parent Node
Node
Row
They are reading all the flat files row by row.
and even in receiver they are reading in the similar fashion
3) In the current structure according to the FS we have to create a structure defined by them which is as below
Employee
Header
Details node 1
Details node 1a
Details node 1b
Trailer
Loan Header
Loan Detail
Loan Trailer
Receiver structure is
Employee
Node (this will have the receiver fields which is about 30 fields)
4) We have pulled a sample file from 3.0 for the existing interface as we din get the sample file for existing one in FS and Iam not sure whn are they gonna send it.
5) In the existing interface payload we have everything matching even the field lengths and postions and even key fields and key fields we got from the FS
6) problem is we donot have key fields for the Details node 1a and 1b even in FS or the existing payload and we got an update from the FS consultant that we will be receiving these fields but without keyfields...
see i donot have any problem taking out the details 1a and 1b out of the details header and create the structure ,,,,but the main issue is without key field we will not be able to generate the 1a and 1b nodes or read it in the FCC or MTB (i have to use MTB as we are decryting the file from the sender).
Or is there any other method apart from java mapping or module development to handle these files -
Why should we select all key fields when using for all entries
Hi,
Why should we select all key fields in our select query when using for all entries statement?
I read about for all entries but this point was not clear in any post.
Please explain me
Regards,
SubhashiniDear Subhasini,
It is because FOR ALL ENTRIES deletes the duplicate entries before populating the target internal table.
Please do an F1 on FOR ALL ENTRIES & read the SAP documentation.
I mean how duplicate entries will not get deleted when we use this?
Quite simple, if you select all key fields then each entry will be unique & there will not be any duplicate entries to delete !!
BR,
Suhas
Edited by: Suhas Saha on Oct 16, 2009 9:41 AM -
Sender file Adapter without Key field
my File structure will be as follows
<HEADER>
<DATA1>
<DATA2>
<DATA3>
<HEADER>
<ITEM>
<ITEM1>
<ITEM2>
<ITEM3>
<ITEM>
WHERE i do have flat file will be as follows
10001,20081902,US
10,soda,1
30,soda,4
40,soda,5
10002,20081902,US
10,steel,1
30,steel,4
40,steel,5
how to pick this file using FCC from sendere flat file adapter without keyfields , and i can use fixed length alsoHi,
with multiple nodes structure( like header and item in your case) you need to have a key field to process this file to a desidered structure using FCC.
Alternatively you can pick all these records as a single node type and classify it as header/items in your mapping by identifiing how each one differs frm other.
~SaNv... -
How to convert flat file to XMl without key field value
Hi experts,
I have a input CSV Flat file which has got one HEADER line and Multiple Detail records.
I do not have any key field value to convert this FLAT file to XML using normal file content conversion.
Is there any module or Bean which can be used to convert this Flat File to XML.
Or any other remedy to overcome this problrm.
Thanks in advance.
Regards
PradeepHi Saurabh,
Thanks for the reply.
Ur understanding is perfectly alright.Lets say my file is like below.
Account Number,Account Name,Currency,Unclear Balance,Account Balance010205000033,VAISHNAVI SALES CORPN,0.00,0.00,350000.00
010205000034,CHAKKA ENTERPRISES,0.00,-641350.47,8649.53
010205000035,SEHGAL TRADING COMPANY,338665.00,-220.00,461115.00
010205000036,SHUBH LAXMI AGENCIES,0.00,0.00,0.00
010205000037,EMPIRE AGENCIES,0.00,-245.11,0.00
010205000038,PIONEER AGENCIES,0.00,-696386.00,303614.00
I am not using the first line in the mappiing.
Are you saying that I need to ignore the first line while doing the conversion using Recordset OFFSET ?
Or do I need to make a single structure taking all the fields from header as well as details and while defining the structure I need to ignore the fields from header?
Please suggest. -
Content Conversion without key field value
Hi all,
I want to do a content conversion which includes a record structure Header,1,Detail,*
I dont have any key field value in the header nor in the detail. Can this be achived using FCC or should i go for Java.
Rgds
AdityaHi Aditya,
I think if u having multiple records then one shud hav key fields,
pls check 4th point in this guide
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/troubleshooting%2bthe%2bfile%2badapter
Also check this discussion::File Content Conversion(SenderFileadapter) fields parameters
Thanks, -
File content conversion without key field
Hi,
i have a input file with the following format:
posvalue1;posvalue2;posvalue3;posvalue4
posvalue1;posvalue2;posvalue3;posvalue4
posvalue1;posvalue2;posvalue3;posvalue4
posvalue1;posvalue2;posvalue3;posvalue4
posvalue1;posvalue2;posvalue3;posvalue4
footervalue1;footervalue2;footervalue3
footervalue1;footervalue2;footervalue3
i just need the information from pos lines and the footer is not needed. the only indicators are:
the empty line between
the number of fields
maybe i could use the keyfieldvalue:
in posvalue2 i have only numbers (diffrent) in footervalue2 i have only chars (diffrent)
has anyone an idee?
regards
J.Hi
yes you have to use the key field value as the posvalue1.
if you do not want the footer informatuion in the target side then inthe grahical mapping do not map footer fields with the target structure.
to convert the text file into XML file you can use the following parameters
RECORD.fieldSeparator :;
RECORD.fieldNames :KEY,FNAME,LNAME,AGE
RECORD.keyFieldValue :1
DETAIL.fieldSeparatr :;
DETAIL.fieldNames :KEY,SALARY,EMPID
DETAIL.fieldNames :2
Note:these parameters are accoding to the structure given below.
suppose you have a structure like as below
data (0..unbounded)
record (0..unbounded)
key (1..1)
fname (1..1)
lname (1..1)
age (1..1)
detail (0..unbounded)
key (1..1)
salary (1..1)
empid (1..1)
and the input file will look like as below
1,aaa,bbb,23
2,12000,10838
1,ccc,ddd,23
2,13000,10830
if you still face the problem please reply me back
Thanks
Rinku -
Selecting Semantic Group Key Fields for Cube to Cube DTP
Is it possible to use the semantic group key fields selection when performing a DTP between two infoCubes? When I try to select the key field of 0CALWEEK, i am unable to as the selection screen is grayed out like I'm in display mode even though I'm in change mode for the DTP.
Thanks,
MatthewHi,
Have you initialized the planning area for the 11th key figure to be loaded. Make sure that the key figure which you want to load is initialized for the planning version for the respective planning area.
Also check the loading period inside the variant is within the planning area initialized period for that key figure. And make sure that you have made the key figure assignment for the info cube and planning area inside the variant.
thanks and regards
Murugesan -
No key field found for creation of DataSource - Classification Datasource
Hello,
While trying to create a clasiffication datasource based on 0PLANT_ATTR, when i assign a characteristic and push the DataSource button, i get the following message:
No key field found for creation of DataSource
Diagnosis
During generation of a classification or configuration DataSource, only those key fields for the object table (field "Obj.Tabelle") that are already present in the basis DataSource transferred to the extract structure. This is the case when none of the key fields of the object table were found in the structure of the basis DataSource.
System response
A DataSource cannot be created without key fields. The action was cancelled.
Procedure
Check whether you have selected the correct basis DataSource and object table. For more information, please see SAP Note 569849.
Do you know what can be the problem?
Thank you and regardsHi Alberto,
plants are a special case. The key which is used for the classification
of plants (object type BETR) is not the same as the key which is used in
datasource 0PLANT_ATTR.
BETR has key LOCNR (Site). That's a customer related to a plant. The
customer number will be extracted in field LOCNR.
0PLANT_ATTR extracts the plant in its key field WERKS.
Transaction CTBW and the generic extraction program for classifications
don't know the relationship between LOCNR and WERKS. So they cannot map
them.
I do recommend a solution which would add the mapping between
LOCNR and WERKS:
1. Create please the classification datasource as intended, but use
datasource 0RT_LOC_MGR_ATTR as basis datasource. It's the only
datasource of the content where LOCNR is a key field. So
0RT_LOC_MGR_ATTR is used as a dummy here, to allow transaction CTBW to
create the classification datasource. It's not necessary to extract
data with datasource 0RT_LOC_MGR_ATTR.
2. Extend please the extract structure of the created classification
datasource. Add please field WERKS using component type WERKS_D. Make
this field visible.
3. Fill field WERKS in the extractor user exit EXIT_SAPLRSAP_002. WERKS
can be read from table KNA1 by using the customer number extracted to
LOCNR to select on field KNA1-KUNNR.
4. Transaction CTBW_META on the BW system isn't able to append the
characteristics from the classification datasource to infosource
0PLANT, because the keys are different. So create please a new info
source with CTBW_META. This allows CTBW_META to create the info objects
for the characteristics used in the classification datasource.
5. Add please the characteristics used in the classification datasource
to infosource 0PLANT manually. You will find the info object names of
the characteristics by looking up the characteristic datasources which
are assigned to the classification datasource in transaction CTBW. From
these names you can derive the info object names:
1CL_A... -> C_A...
6. Disconnect the infosource which has been created with CTBW_META from
the classification datasource.
7. Connect please the classification datasource to infosource 0PLANT
Use following info object:
info object field
0PLANT WERKS
The info object names for the characteristics are explained in step 5.
8. Add an infopackage to infosource 0PLANT for the classification
datasource.
Now the extraction of classifications of sites should work.
Best regards,
Rolf
P.S. I saw the system messed it up and doesn't display any new and empty lines. Sorry, I hope you still can read it.
Edited by: Rolf Doersam on Mar 26, 2010 6:56 PM -
FILE Adapter (Key field)
Hi,
FILE-XI-FILE scenario
Msg Structure is like this
<b>DT_HEADER</b>
- >COMPANY
- >LOCATION
<b>DT_CONTENT</b>
->FIRSTNAME
->LASTNAME
->DESIGNATION
->LOGIN
->LOGOUT
->TIME
I have given <i>company and Firstname</i> as keyfield in the sender adapter paramemter.
In Content Convesion parameters :
DT_HEADER.keyFieldValue='HITACHI'.
DT_CONTENT.keyFieldValue='MM'
If that given value is in flat file.
it is giving output, but if the value is different,values are omitted
This key field may contain diferent values....
so how to tackle the situation
is there any option giving like '* '
regards
maheshHi Mahesh,
Without key field it will be impossible to distinguish between different substructures. If you have any logic to identify the rows ( Header or item ) you can apply the same in the custom-module and add a dummy key field to each row. These fields will have only two values - one for Header and one for Items. Based on this then you can configure the adapter.
The dummy key field can then be omitted in the resultant XML.
CHEERS
Amit -
FCC configuration in Sender File Channel Without any key field name
Hi Everyone,
We have below flat file generated from ECC using standard tcode.
The flat file is fixed length file and first record is header record followed by line items.
There is no key field name in the file name.
Can we read the file and convert into xml without any key field name?
I want to understand if the FCC configuration for above file can be done without key name or not.
Thanks,
VertikaHello,
AFAIK, using FCC i really doubt u can convert file into xml.
So technically, there are two options either read each line one by one and then do conversions in ur mapping or write a custom module which will read ur input file and convert into xml.
Configuring Generic Sender File CC Adapter
Thanks
Amit Srivastava -
Problems with BC4J input select tag when its bounded to a primary key field
HI..
I have an jsp BC4J edit form. This form uses a BC4J input select tag. This component is mapping one of the primary key Entity fields.
When im working with this component and it doesnt map a primary key field it shows the default "none" value when im inserting a record(thats Ok). but when it maps a primary key field the default value is a database value so it is not advisable.. How can i do in order to fix that?
Thank youThe none value is only shown when the field accepts null values.
-
Select query on key field for different time format
Hello Experts,
I am working in Sender ABAP proxy <===> SAP PI 7.31 JAVA <===> Oracle database.
Oracle Database stores all records of material sold where the date is maintained in 01/15/2010 01:48:20 which has date and time format.
In ECC , I will be sending a proxy request with system date as the only field and this would be key field to select all the material records sold for 01/15/2010 in Oracle Database i.e. Select statement.As we can observe that the system data of ECC does not have time stamp.
I am clueless how to get this done in Message Mapping or in some way? If I maintain just the date stamp of ECC as the key field, would I be
able to fetch all the records from Database?
Regards
RebeccaDear Hareesh and Harish,
Ooopps the names are confusing. but very close..
Yes I changed my receiver structure and added <compareOperation> under the key field Material Number. In the Message Mapping , I assigned a constant EQ to <compareOperation>.
Now tested the proxy will value of Material with no 100 , expecting a response from database for Material 100. But getting error as below.
xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SAP:Category>XIProtocol</SAP:Category>
<SAP:Code area="PARSING">GENERAL</SAP:Code>
<SAP:P1 />
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText />
<SAP:Stack>com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessageExpiredException: Message 53cc7fab-e712-0b20-e100-8000ac10134c(OUTBOUND) expired. at com.sap.aii.adapter.soap.web.SOAPHandler.processSOAPtoXMB(SOAPHandler.java:746) at com.sap.aii.adapter.soap.web.MessageServlet.doPost(MessageServlet.java:505) at
I am not sure whether there was any response from database.
I am close to end of this thread..
Please guide.
Regards
Rebecca -
Need to select from BSEG on Non Key fields.
Hi all,
I am developing a report on Work Order Cost Analysis. The selection screen has Order Type (AFPO-DAUAT), Plant (AFPO-DWERK), Date range (AFKO-GLTRI) and Part Number (AFKO-PLNBEZ) as the selection criteria. <b>All the orders and their corresponding object numbers (OBJNR) are picked in an internal table</b>, for all orders that fulfill the selection criteria and their Actual Finish Date (AFKO-GLTRI) falls between the entered date range.
Now comes the problem, <b>corresponding to these Order Numbers I need to pick records from BSEG.</b> Since this is not a key field in BSEG, its not indexed and the report times out on the Development Server itself.
<b>I also tried using COEP</b> table as the fields that I need are present there as well (Though I am not sure weather it would be give me all the lines of records that I need from BSEG), but that operation also times out.
LDBs also don't seem to help. Is there any way I can achieve the above?
<b>PLEASE HELP. REWARDS GUARANTEED.</b>
Regards,
NikhilOK - a couple of things:
In the select from covp, you are retrieving the CO document data not the FI document data, so you need the reference documents.
Even though OBJNR is the first field of a key it will not be very selective. It would be better if you could specify more fields. Fortunately, some are standard and you can probably figure out what to use. If you can limit this to a single fiscal year, it would be best. Failing that, you should specify any (or all) fiscal years in a range table (using =).
This is the select that I came up with:
SELECT refbk refbn refgj refbz
FROM covp
INTO CORRESPONDING FIELDS OF TABLE it_covp
FOR ALL ENTRIES IN it_worder
WHERE lednr = '00' "Standard ledger
AND objnr = it_worder-objnr
AND gjahr IN s_gjahr
AND wrttp = '04' "Actuals
AND versn = '000' "Plan/Actual ver.
AND orgvg = 'RFBU'. "FI Postings
I filled s_gjahr with the individual years from 1995 to 2006 and it ran in under 20 minutes. (The first select was wide open and selected all.)
Rob
By the way - do you still need to go to BSEG, or can you get everything you need from COVP?
Message was edited by: Rob Burbank -
Content conversion without delimiter and key fields
I am pretty new to XI, so it has been very challenging till now... (and someway I want to keep it that way) But this problem has kept me awake a couple of nights, so I will unleash it to the XI experts at SDN!
I have to read a legacy file (customers are ordering stuff) with the following content into XI. I finally found out you can use file content conversion to do the job, but I have only seen scenarios where people can use delimiters or key fields so far. I suppose XI can do this job as good as the others, but the question is how it has to be done! :-s
Do I have to use key fields? Or can I simply state there will be 1 header line, X order lines, 1 EOF line?
Sample content:
100207.310551
0107299700001
0108658400001
0109575600001
1200276500001
0109745600001
9999999999999
Header line containing the customer (100207) and the ticket number (300551) separated by a dot.
In this case 5 order lines containing material (8 digits, ex 01072997) and quantity (5 digits, ex 00001)
Line containing only 9's to indicate the end of the file has been reached.
Thanks in advance!
SvenHi Sven,
This FCC might help u..If your structure like ...
<?xml version="1.0" encoding="UTF-8" ?>
<ns0:bestin xmlns:ns0="http://test.com">
<recordset>
<header>
<client>100207</client>
<ticket>310551</ticket>
</header>
<item>
<material>01072997</material>
<quantity>00001</quantity>
</item>
<item>
<material>01086584</material>
<quantity>00001</quantity>
</item>
<item>
<material>01095756</material>
<quantity>00001</quantity>
</item>
<item>
<material>12002765</material>
<quantity>00001</quantity>
</item>
<item>
<material>01097456</material>
<quantity>00001</quantity>
</item>
</recordset>
</ns0:bestin>
then
RecordStructure----header,item
otherwise
RecordStructure----client,ticket,item
client.fieldFixedLengths----give length of client
ticket.fieldFixedLengths----
item.fieldFixedLengths----
client.fixedLengthTooShortHandling--Cut
ticket........same
item.....
client.addHeaderLine--0
ticket........same
item.....
recordsetStructureOrder---var
Cheers!
Samarjit
Message was edited by:
Samarjit Dey
Maybe you are looking for
-
ISE 1.2 Profiler Feed Service
Just curious if any updated device profiles have been made available for download via the feed service in ISE 1.2?
-
Unable to clear overrides with Warnock Pro ornament (a real puzzle!)
Hi, This is really weird. I have a paragraph that InDesign CS6 is marking as overriden. Nothing I do clears this override (the little plus next to the paragraph sign). Now, this is nothing very new. InDesign does do this sometimes. But this time I wa
-
I don't know how much more I can add...However, when I type in the Norton Safe Search box up to the search button in Norton Safe Search I can continue to type but I can't see what is being typed because it doesn't allow me to see the trailing end of
-
Can i move a sparsebundle onto my bootcamp HD?
i am in my windows 7 boot camp install and I am trying to move a sparsebundle /off/ a Mac OSX journaled external drive to the Boot Camp drive but I am getting an error that says: could not find this item. this is no longer located in the G:\Data...yo
-
Develop module in Lightroom CC not working
I've just installed Lightroom CC& used it to create a panorama and a HDR, both of which were successful. I then tried to edit them in the Develop module but was rewarded with a blue screen where the image should be; I then found that this happened to