IDOC - How to relate a segment and its sub segment
consider this scenario
E1MBXYH : Goods movements for mobile data entry (header data)
Status: Required , min. number : 1 , max. number : 1
E1MBXYI : Add goods movement from external system: Item
Status: Required , min. number : 1 , max. number : 9999
E1MBXYJ : Create Goods Movement from Non-SAP System: Item++
Status: Optional , min. number : 1 , max. number : 1
E1MBXYJ is a sub segment of EIMBXYI
For every record in segment EIMBXYI i have to find 1 coressponding record in segment EIMBXYJ
Loop at idocdata where segname='EIMBXYI'
Loop at idocdata where segname='EIMBXY' and ?
endloop
endloop
How do i find the relation between the 2 segments. There are no common fields for the segment structures.
Message was edited by:
raja
Hi Raja,
The is automatically governed by the hierachy and the occurrences that is defined in WE30 for an IDoc type.
In WE30 we create the segment hierachy (parent and child). Double clicking any segment will lead to its occurrences (min and max). You can also navigate to segment editor to see the fields in that segment.
Idoc data is just an internal table, we just append segments to that table based on the occurrences in the sequence (child cannot occur before parent) shown in the hierarchy in WE30.
So you have to deal with indexes in this case. So EIMBXYI will occur first followed by child E1MBXYJ in the idoc_data internal table.
If there are 10 E1MBXYI then also this order will be followed - E1MBXYI followed by E1MBXYJ and so on..
Hope this helps.
Regards,
Gajendra.
Similar Messages
-
How to ZIP the files and folders/sub folder files using java
HI All,
I'm New to this Forum, Could anybody tell me how to zip the files and folders/sub folders using java. For example I have a folder with the name testfolder and side that folder I have some files and some sub folders inside subfolders I have some other files. I need to ZIP the files and folders as they are in same hierarchy.
Any pointers or help wolud be appritiated.
Thanks,
Rajeshbabu V[http://www.devx.com/tips/Tip/14049]
-
How to get the table_name and its count(*) in a SQL
Hi,
Can anybody tell me how to write a sql to get the table_name and its count(*) in a SQL:
Output should be:
table_name count(*)
XXX 261723
YYY 3343
Regards,
G. Rajakumar.hello
there r a lot ways
i'll suggest u two of them
1) the following dynamic sql procedure
DECLARE
TYPE array_type IS TABLE OF VARCHAR(30);
TYPE cur_typ IS REF CURSOR;
c1 cur_typ;
count1 integer;
tab_arr array_type;
querystr varchar2(200);
begin
SELECT table_name bulk collect into tab_arr FROM sys.all_all_tables ;
FOR I IN tab_arr.first..tab_arr.last LOOP
DBMS_OUTPUT.PUT(TAB_ARR(I));
querystr := 'select count(*) from ' ||TAB_ARR(I);
open c1 for querystr;
fetch c1 into count1;
EXIT WHEN c1%NOTFOUND;
dbms_output.put_line(count1);
END LOOP;
close c1;
END;
2) or use ANALYZE to analyze the tables and get the number of rows in the NUM_ROW column of DBA_TABLES view.
if u still have any problem mail me at [email protected]
shalini -
How to fetch Junk values and its columns dynamically
Hello,
Can anyone help me in writing a procedure/dynamic SQL to fetch the column where the junk values appears and its value. Eg: If emp table contains ID and Name columns, and ID column contains junk values, the result should be the Id column and the junk value/s. It should be dynamic because next time if the other column contains junk values(like $,%...), the query should display the other column too..
Thanks in advance..Can anyone help me in writing a procedure/dynamic SQL to fetch the column where the junk values appears and its value. Eg: If emp table contains ID and Name columns, and ID column contains junk values, the result should be the Id column and the junk value/s. It should be dynamic because next time if the other column contains junk values(like $,%...), the query should display the other column too..1. define "junk" values.
2. usually it does not matter what values are in ID, because it is used internally by application, to maintain uniqueness or relations, not having any semantical meaning. End users usually should not see IDs, such IDs are generated automatically. There is no need to cleanse them from "junk" values.
3. If you made a typo, and you are looking for "junk" values in Name column, it is a different story. You can use TRANSLATE to search such values, as already advised, translating all "junk" characters to one "junk" character and searching for the latter.
select id, name from T where translate(name,'?@#$%^<>','~~~~~~~~~') like '%~%';
Edited by: Mark Malakanov (user11181920) on Jan 4, 2013 11:40 AM -
How to find custom parameters and its values?
Hi,
Please let me know how to find the list of custom parameters with its possible values and its use in programs?
Thanks.There is no validation for the values that can be input so you can put anything in the value field. For example, try "BUK" and
then a value for a company code you know does not exist.
When you run a transaction with that it will default that value. -
How to extract a folder (and its contents) from inside a zip file?
There is a zip file which contains a folder inside it. The folder itself contains a few files. I would need to know how to extract the folder (with its contents) from inside a zip file.
I have found a few unzipping code samples which show how to handle a folder inside a zip file. An example is shown below:
public static void extract(String workingDirectory, byte[] zipFile)
throws Exception {
ByteArrayInputStream byteStream = new ByteArrayInputStream(zipFile);
ByteArrayOutputStream out = new ByteArrayOutputStream();
ZipInputStream zipStream = new ZipInputStream(byteStream);
ZipEntry zipEntry = null;
String nameZipEntry = null;
byte[] contentZiphttp://forum.java.sun.com/post!default.jspa?forumID=31#
Click for code tagsEntry = null;
boolean isDirectory = false;
int indexFileSeparator = -1;
String directory = null;
String fileName = null;
while ( (zipEntry = zipStream.getNextEntry()) != null )
nameZipEntry = workingDirectory + File.separator + zipEntry.getName();
isDirectory = zipEntry.isDirectory();
if (isDirectory) {
File file = new File(nameZipEntry);
file.mkdirs();
else
// read zipEntry
byte[] buf = new byte[1024];
int c = 0;
while ( (c = zipStream.read(buf)) != -1)
out.write(buf, 0, c);
indexFileSeparator = nameZipEntry.lastIndexOf(File.separator);
directory = nameZipEntry.substring(0, indexFileSeparator);
fileName = nameZipEntry.substring(indexFileSeparator+1,nameZipEntry.length());
FileSystemTools.createFile(directory, fileName, out);
out.reset();
zipStream.closeEntry();
zipStream.close();
byteStream.close();
}The code sample which deals with the part where the zipEntry is a directory creates a directory with the same path and name. (highlighted in bold)
Another similar variation is:
File file = new File(dirDestiny.getAbsolutePath() + File.separator + zipEntry.getName() );
if(zipEntry.isDirectory())
file.mkdirs();When the code creates a directory for the folder, does it unzip the contents inside the folder as well?
If not, how do I extract the files inside the folder?Have you already tried to see if the sample code you downloaded works or not? Maybe if you try out the code yourself you can see if it extracts files from a directory within a zip file?
I like to use pkzip. It is a command line compression/uncompression tool that can be used from a batch file. If you assignment involves unzipping large amount of zip files on a regular basis, I recommend taking a look at pkzip. -
A query related to ProgressBar and its placing inside Container
Hi ,
I tried an example with Flex3 ProgressBar .I am posting the scenario in which it was correct in one case and wrong in another case .
Please tell me what is wrong here in the wrong case :
The Program is related to :
I have button on click of that i will be loading the Image . There is no Button and its event Listener Mentioned here .
Correct Approach :
This works fine as the Image and ProgressBar are in the same Container called HBox
<mx:HBox>
<mx:Image id="image" autoload="false"/>
<mx:ProgressBar id="MYPB" source="{image}"/>
</mx:HBox>
Wrong Approach :
The below isn't working as i placed ProgressBar outside the container called as HBox
<mx:HBox>
<mx:Image id="image" autoload="false"/>
</mx:HBox>
<mx:ProgressBar id="MYPB" source="{image}"/>
Please share your ideas as why this behaves this way .Hi Kiran.
I don't think either of the approach is wrong , it no way effected by placing the ProgressBar inside a container or outside the container.
Run the sample application below. It will load for both approaches.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Script>
<![CDATA[
public function loadImage1():void {
image1.load('assets/liazon_logo.png');
public function loadImage2():void {
image2.load('assets/liazon_logo.png');
]]>
</mx:Script>
<mx:HBox>
<mx:Image id="image1" autoLoad="false"/>
</mx:HBox>
<mx:ProgressBar id="MYPB1" source="{image1}"/>
<mx:Button label="Load Image1" click="loadImage1()"/>
<mx:HBox>
<mx:Image id="image2" autoLoad="false"/>
<mx:ProgressBar id="MYPB2" source="{image2}"/>
</mx:HBox>
<mx:Button label="Load Image2" click="loadImage2()"/>
</mx:Application>
If this post answers your question or helps, please kindly mark it as such.
Thanks,
Bhasker Chari -
soem how my iphone deleted an app. can I retore it and its contents? How? thanks
Redownload it from the app store.
-
How to recover deleted account and its files ?
I have 2 accounts on my iMac and deleted accidentally one of the accounts and its files. Since both accounts are backed up via time machine, can I recover the deleted account?
I tried to find it on time machine but with no success. Could someone help how to trace the deleted account on time machine?
Many thanks
Tom+I have 2 accounts on my iMac and deleted accidentally one of the accounts and its files.+
In your admin account, go into the Accounts preference pane and recreate the account, if you deleted it from the list. If you didn't delete it, do so now and then create it again. That will create a new home folder for the user. Then log in as that user and restore the files. -
How to search a word and its page in Acrobat 6.0 using vb6.0
Hi all,
I would like to search a word and its corresponding page number in my PDF document. The word may be occur in many of the pages and i have to collect all the page numbers and need to create bookmark for all of them.
Eg: The word "Chennai" can be found in the pages 5, 6, 7 and10. Then I need to create bookmarks Chennai1 - Page 5, Chennai2 - Page 6 and so on...
I have tried this with Acrobat 7.0 professional and it was working fine. But in 6.0 Professional i am not able to collect all the pages. Below I have given the code that i have used.
Dim objFind As Acrobat.CAcroAVDoc
Set objFind = CreateObject("AcroExch.AVDoc")
Do While objFind.FindText("MyText", 0, 1, False)
Dim objPageView As Acrobat.CAcroAVPageView
Set objPageView = objFind.GetAVPageView
strPageNo = objPageView.GetPageNum + 1
If strPageNo = strPrevPageNo Then
intIncremental = intIncremental + 1
Else
intIncremental = 0
End If
If intIncremental > 50 Then
Exit Do
End If
If Val(strPageNo) < Val(strPrevPageNo) Then
Exit Do
End If
strPrevPageNo = strPageNo
Loop
Thanks in advance,
Dhanasekaran. GAdobe no longer supports Acrobat 7 or earlier.
-
Help me Friends - How to Delete a Folder and its contents in java
Hi Friends
I want to delete a folder and its contents by passing the folderpath.
Can any one help me in this..
Thanks in Advance
Regards
Krishna* Delete a directory including all of its content.
* @param directory Directory path to delete.
public static void deleteDirectory(String directory) {
if (directory != null) {
File file = new File(directory);
if (file.exists() && file.isDirectory()) {
//1. delete content of directory:
File[] files = file.listFiles();
int count = files.length;
for (int i = 0; i < count; i++) { //for each file:
File f = files;
if (f.isFile()) {
f.delete();
} else if (f.isDirectory()) {
deleteDirectory(f.getAbsolutePath());
}//next file
file.delete(); //finally delete (empty) input directory
}//else: input directory does not exist or is not a directory
}//else: no input value
}//deleteDirectory() -
Mapping and creating new instances of a node and its sub-nodes
hi,
i need to map every 3 items from source interface to 1 in target interface.
i have on target interface parent node which is called 'item' and occurs 0..unbounded (and other sub-nodes).
this node have a sub-node which is called 'item_data' and occurs 0..3.
i created a mapping:
source_item ->counter->checking mod 3--->if
"""""""""""""""""""""""""""""" source_item -
> then -
>item.
when i test mapping with 1-3 source_item the sub-nodes 'item_data' are created,
but when i try 4-5 and more , 'item' node is created twice but the second instance has no sub-nodes of
'item_data' (it has other sub-nodes).
can someone tell me how to solve my problem?
thanks in advance.
TomerI would like to be clear about the requirement first,
Source Target
item -
> item
item_data -
> Item_data
item -
>
item_data -
> irem_data
item -
>
item_data -
> item_data
item -
> item
item_data -
> item_data
item -
>
item_data -
> item_data
item -
>
item_data -
> item_data
for the mapping of item node the queue should look like:
contextchange
Then for the mapping of item_data the queue should look like:
item_data
item_data
item_data
context change
item_data
item_data
item_data
I guess you have used some udf for the target parent node (item) mapping. I am trying myself to generate the queue for item_data using standard functions, but yet to come up with the desired result. If achieved will let you know..................for now it seems that writing a UDF (queue) would be the best approach.
iterate through the input queue array (source item_data values all in same context using RemoveContext) and insert a ResultList.CC after every third element in the array.
Hope you can come out easily with the java for this logic. Let me know if it's helpful.
Regards,
Suddha -
Scrap Asset and its sub assets in one transaction code
Please suggest if it is possible to scrap an asset and all its sub assets in one transaction as opposed to scrapping them separately in ABAVN.
regards
RekhaClick on the button Multiple assets and fill in there the main asset and sub numbers. You have to fill them all in. There is no transaction that you can do this with filling in only the main-asset number
-
Getting all webI reports in a folder and its sub-folders using java sdk.
hi,
I need a java code to get the Id of all webi reports in a folder and recursive sub folders .
Is there any sample code or tutorial available for It?
regards,
nitinI didn't test this but it should work. Import required packages.
<%
String username = "administrator";
String password = "<password>";
String cmsname = "<cmsname>";
String authtype = "secEnterprise";
IEnterpriseSession oEnterpriseSession = CrystalEnterprise.getSessionMgr().logon(username, password, cmsname, authtype);
IInfoStore oInfoStore = (IInfoStore)oEnterpriseSession.getService("","InfoStore");
getWebi(oInfoStore,0,out);
oEnterpriseSession.logoff();
%>
<%!
public void getWebi(IInfoStore oInfoStore, int sourceFolderID, javax.servlet.jsp.JspWriter out)
try
String query = "select * from ci_infoobjects where si_kind='webi' and si_instance =0 and si_parentid =" + sourceFolderID ;
IInfoObjects oInfoObjects = oInfoStore.query(query);
for(int i=0;i< oInfoObjects.size(); i++)
IInfoObject oInfoObject = (IInfoObject) oInfoObjects.get(i);
out.println(oInfoObject.getID() + " " + oInfoObject.getTitle() +"<br>");
String query = "select * from ci_infoobjects where si_kind='folder' and si_parentid = " + sourceFolderID ;
oInfoObjects = oInfoStore.query(query);
for(int i=0;i< oInfoObjects.size(); i++)
IInfoObject oInfoObject = (IInfoObject) oInfoObjects.get(i);
getWebi(oInfoStore, oInfoObject.getID(), out);
catch(SDKException e)
out.println(e.toString());
%> -
IDOC: How to create child segment with abap code.
Hi,
I'am trying to write an abap code to create segments for an Idoc which structure is the following:
ZLE_00060_DLVY
> E1EDL20
> Z1DEL_CONS
>Z1DEL_MAT_HEADER
> Z1DEL_MAT
> E1EDL20RET2
> E1EDL22
> E1EDL21
> E1EDL23
> E1EDL51
I receive a sintax error: Error in IDoc with status 26 .
Checking the result I note all segment at the same level and an error about the segment E1EDL22
EDI: Syntax error in IDoc (segment cannot be identified)
Message no. E0078
Diagnosis
The segment E1EDL22 does not occur at the current level of the basic
type DELVRY05 (extension ZLE_00060_DLVY).
This error can have several reasons:
o The segment E1EDL22 is assigned to a group whose header segment does
not occur.
o The segment E1EDL22 does not exist in the syntax description of the
basic type DELVRY05 (extension ZLE_00060_DLVY).
o The sequence of segments in the group in which the segment appears
is incorrect.
Previous errors ('mandatory' segment or group missing) may be due to
this error.
Procedure
Please check the IDoc or the syntax description of the basic type
DELVRY05 (extension ZLE_00060_DLVY).
After the error I have:
data records
E1EDL20
Z1DEL_CONS
Z1DEL_MAT_HEADER
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
E1EDL20RET2
E1EDL22
E1EDL21
Abap code:
idoc_data-segnam = 'Z1DEL_CONS'.
idoc_data-sdata = s_z1del_cons.
append idoc_data.
idoc_data-segnam = 'Z1DEL_MAT_HEADER'.
s_z1del_mat_header-tsegment = 'MATERIAL'.
idoc_data-sdata = s_z1del_mat_header.
append idoc_data.
clear idoc_data-sdata. <<<<<<<<<<< how to indent the structure because this is a child.
idoc_data-sdata = s_Z1DEL_MAT.
idoc_data-segnam = 'Z1DEL_MAT'.
append idoc_data.
idoc_data-segnam = 'E1EDL20RET2'.
idoc_data-sdata = s_E1EDL20RET2.
append idoc_data.
clear idoc_data.
idoc_data-segnam = 'E1EDL22'.
idoc_data-sdata = s_e1edl22.
append idoc_data.
clear idoc_data.
idoc_data-segnam = 'E1EDL21'.
idoc_data-sdata = s_e1edl21.
append idoc_data.
Any help will be well appreciated.
Thanks in advance.
Regards,
GiovanniHi,
following in debugging mode the abap code of the INCLUDE ZXTRKU02 where is defined the TABLES IDOC_DATA STRUCTURE EDIDD, I find that all field of the table IDOC_DATA are not set. More exactly my expectation is to find values for SEGNUM, HLEVEL, PSGNUM.
In a few words I need to execute an enhancement, via abap code, of the struscure of the idoc before sending it out since I have a requirement to test this enhancement in my XI environment, receiving as input this ideoc modified.
Then, I need to add a new segment and one child.
Any suggestion will be well appreciated.
Thanks in advance.
Regards,
Giovanni
Maybe you are looking for
-
How do you create a link to a pdf in Muse? Thought it was going to show that with Katie's menu and can't find in any of the tutorials.
-
Error while releasing to accounting
while i am releasing a billing document to accounting folllowing error is occuring Incorrect doc.no.: 6000002. Select document number between 0090000000 and 0099999999 Message no. F5151 Diagnosis The document number you specified, "&v1", is not in th
-
Sysprep and Windows 8.1 -- missing Metro apps after reboot?
So, I'm trying to figure out an issue with Sysprep and a clean-install Windows 8.1 64 Enterprise system: When I sysprep the computer from my admin account with my unattend.xml file, when it reboots, I'm only getting 7 Metro apps at the start screen a
-
Hi, How can I see pending BNR list which is reflected in B/S?? and I also want to take a G/L,Vendor and Customer report in DEBIT AND CREDIT column base.(i.e debit amt and credit amt in signal report)
-
XML Gallery: Change from MouseEvent to automatic?
I am trying to edit an old XML gallery that I made so that it will scroll through the images automatically, without any user interaction at all. Currently it's set to scroll through them one at a time and is controlled by mouse clicks. I can't figure