IDOC segment fields prefixing blank space with values
Hi Experts,
I am sending data through custom IDOC from SAP to XML which generates successfully but getting 2 problems in the data.
its having 3 level idoc segments:
SEGMENT1 with 1 field (field_name(20))
SEGMENT2 with 3 fields, (code_g(20), field_name(20), value(20))
SEGMENT3 with 4 fields, (code(20), field_name(20), Language(2) & text(20))
When i check the idoc in WE02,
1. i found that segment2-value field is prefixing some space along with the values.
Eg: if the output is "0111" whihc is plant, in the output (WE02) it is giving " 0111"
2. Segment3-language is no where in the output and text which should come as "011" is coming like " EN011" means it is concatinating language field value and displaying it with the text field value with prefixing space.
This is happening in PRD not in QA & DEV. I also checked the transport req and everything, Its same everywhere.
Can anyone please help me on this.
Regards,
Nik
Hi,
This issue happnes when u are moving the data to iDOC segement with offset.
to aviod this improper move instead of using offset statement use below mentioned code.
decalare a structure as
Data SEG1 type SEGMENT1 ,
SEG2 type SEGMENT2,
SEG3 type SEGMENT3.
then while moving
SEG2-code_g = 'XXXX'
SEG2-field_name = 'YYYY'
SEG3-value = 'ZZZZ'
here u are moving the segment values to idoc data (SDATA) and then append it.
move seg3 to idoc-sdata.
then append it to idoc.
hope this helps
Similar Messages
-
Replaced value is not getting relected in IDOC segment field
Hi,
Need your help for the below issue.
I am replacing the PO # with Delivery Doc # . But the replaced value is not getting reflected in the IDOC segment field(e1bp2017_gm_item_create-po_number.).
Function Module which I am using is IDOC_INPUT_MBGMCR as a copy.
Here is my code given below:
SELECT
SINGLE vbeln
INTO lx_vbeln
FROM lips
WHERE vgbel EQ e1bp2017_gm_item_create-po_number.
Move lx_vbeln TO e1bp2017_gm_item_create-po_number.
MOVE-CORRESPONDING e1bp2017_gm_item_create
TO goodsmvt_item.
Then this is passed as TABLE in "BAPI_GOODSMVT_CREATE".
Please do the needful.Hi Dheepa,
Check it in debug whether the filed is empty or having po#, when ur code is executed for the replacement. if it is empty, po# is populated after ur code. in this case you need to write the code in suitable place.
Reddy -
How to map idoc segment field E1IDB02-FIIKONTO with BSEG-ESRNR.
Hi,
I have searched for lot of threads in the forum , and also i tried myself but i am not able to map this fields segment with my logic, so please anyone kindly contribute in mapping idoc segment field with the logic given below:
idoc type :PAYEXT outbound idoc.
message type: PEXR2002
This is my logic: i need to populate the ISR number(BSEG-ESRNR ) in idoc segment field( E1IDB02-FIIKONTO)
DATA : str1 TYPE string,
len1 TYPE i,
len2 TYPE i,
str2 TYPE string,
str3 TYPE string.
str1 = '01-1234-4'. ---> BSEG-ESRNR "ISR Subscriber Number
REPLACE FIRST OCCURRENCE OF '-' IN str1 WITH '_'.
REPLACE ALL OCCURRENCES OF '-' IN str1 WITH space.
CONDENSE str1.
len1 = STRLEN( str1 ).
IF len1 LT '9'.
len2 = '9' - len1.
CASE len2.
WHEN '1'.
REPLACE ALL OCCURRENCES OF '_' IN str1 WITH '00'.
WHEN '2'.
REPLACE ALL OCCURRENCES OF '_' IN str1 WITH '000'.
WHEN '3'.
REPLACE ALL OCCURRENCES OF '_' IN str1 WITH '0000'.
WHEN '4'.
REPLACE ALL OCCURRENCES OF '_' IN str1 WITH '000000'.
WHEN OTHERS.
ENDCASE.
ELSEIF len1 EQ '9'.
REPLACE ALL OCCURRENCES OF '_' IN str1 WITH '0'.
ELSEIF len1 GT '9'.
REPLACE ALL OCCURRENCES OF '_' IN str1 WITH space.
CONDENSE str1.
ENDIF.
Thanks in Advance.Resolved.
-
Hi,
Iam new to idocs and a functional consultant. I need to know whenever we receive the inbound idocs and if i see the segments of the inbound idoc, do the fields which i see in the segments are the sap fields.????/ for instance if the inbound idoc needs to create a sales order, then the fields of the segments of such an inbound idoc are the normal sap sales order fields ??
do i need to give functional specs to the abapers that whenever the inbound idocs is received the segments fields need to be mapped to sales order fields if such an idoc needs to create a sales order ??
regards
sachinHi Sachin,
Most of the IDoc segment fields are simmilar to SAP transaction fields e.g. most of the ORDERS IDoc segment fields will be simmilar to what you can see in VA01/VA02 screen fields.
Some fields may have different names.
In the case of few segments which may repeate in IDoc with different qualifiers (such as partner details, date segments), fields will be same but different qualifier value decides where these field values will be populated in the Order.
If you are using standard function module to create Order, it will take care of mapping IDoc segment fields to VA01/VA02 screen fields. But if it is a Z function module, then you need to specify the mapping.
Hope this information will help you.
Regards,
Mahesh Pakhale -
Hi,
I am having a problem with the display of idoc segment fields. When i check the Idoc segment contents in WE02 it is displaying the fields which dont have the value in the DB table along with the fields which have the data. To avoid this what is the procedure. I dont want to display the fields in the content of segment which does not contains the data.
Plz help me out.
Regards
SantoshHi,
U have to use for reduced message type...U need to filter the segments which u don't want...In BD53 u need to create reduced message type....
plz go through the below link..
http://help.sap.com/saphelp_erp2005/helpdata/en/d3/06f6679aaf0e44b67ca6d6b58d91df/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/0b/2a6702507d11d18ee90000e8366fc2/content.htm
Regards,
Nagaraj -
How to delete blank space from value of Infoobject in the transfer rule
does anyboady know how to write a routine in the transfer rule in order to delete ending blank spaces from value of Infoobject 'ORDTEXT'. E.g. value: 'ABM '? After routine, the result should be 'ABM'.
Thanks for any input.Deleting 'ending blank spaces' from a character type field (ie info-object or text) in SAP is not meaningful. For all usage, a char type field of length 8 having value 'ABM ' is same as 'ABM'.
Ok, HTML is changing the display in the above, so let me restate it
For all usage, a char type field of length 8 having value 'ABM_____' is same as 'ABM', take the underscore character (_) in the first string as a placeholder for space character.
Edited by: Ajay Das on Jul 29, 2009 12:07 PM -
How to Read Idoc - Segment fields values and status messages
Hi,
I am having one requirement as i want to read the segments along with the field values and also i want to read all the status messages.
first i read the idoc data from EDIDS and segments data from EDID4 and the staus messges from T100. but still i am not getting all the status messages.
is there any other table which contains the information of IDOC segments and field values and also the status messages.
Regards,
KumarYou need to use
V_MSGNO = EDIDS-STAMNO.
CALL FUNCTION 'MESSAGE_PREPARE'
EXPORTING
MSG_ID = EDIDS-STAMID
MSG_NO = V_MSGNO
MSG_VAR1 = EDIDS-STAPA1
MSG_VAR2 = EDIDS-STAPA2
MSG_VAR3 = EDIDS-STAPA3
MSG_VAR4 = EDIDS-STAPA4
IMPORTING
MSG_TEXT = V_TEXT.
WRITE: / V_TEXT.
a® -
Custom idoc segment fields not populated
Way back in 1999 someone create a custom Idoc type with custom Idoc segments in it. Unfortunately, they forgot to release one of the segments.
Recently a change was request to add new fields to this custom segment. In order to get the fields transported the segment had to be released.
All worked fine in Dev and the new Idoc segments were populated as expected. However when the idoc segment was moved to the test system all visually appears to be fine but when the idoc is created (status 50) the new fields are not popultated.
In 40B the start of the inbound process was IDOC_INBOUND_DATA. Does anyone know what the new starting point is in 4.7??
I beleive the error is actually that SData is not reading all the input values and stopping right where the old fields end in teh custom segment.
Thanks,
Anthonyadditionally,
SAP will not allow us to release the basic idoc type because it was released in 40B. It also will not allow us to cancel the release since we are now in 620. So, unless anyone has input for this I think the only solution will be to create a successor IDoc type and change our apps to use the new IDoc type with it's enhancements. -
How to replace blank spaces with zero's in the report
hai sdn guys,
we have a requirement where we cannot have any blank fields in the report and i need to replace the blanks with a zero. What is the best way to do it.Hi Sunitha,
It is not proper that you are posting the same question multiple times:
Re: report o/p should not have blank spaces in - in case of no value
should get 0's in place of blank value in the output of the report
That too inspite of my requesting you not to do so.
I am not sure if you have ever gone through the Rules Of Engagement which are prominently posted in each forum, but I think it is SDN courtesy to provide proper feedback when posting a question and assign points as deemed fit. This helps (and motivates) everyone to work on your problem and try to give you a solution. I hope you will be more careful in the future. Thanks! -
Idoc segment field - maximum length ?
Hi,
what is the maximum of characters in a segment field of an idoc ?
regards,
HansMax length = 1000 characters
Check out
http://help.sap.com/saphelp_nw04/helpdata/en/1c/9fad3a05fdb92de10000000a114084/content.htm
FYI
ALE Interface
The following objects are generated from the application function module:
· Message, IDoc structure and segments: Mapping of the complex data type
· Outbound function module: Each IDoc always contains one application object only
· Inbound function module: IDocs are always transferred to the application individually or in packets of objects.
· Customizing objects required for the run
Assigning names to generated objects
· Default message (maximum 30 characters) proposed from the function module name.
· IDoc (maximum 30 characters) is derived from the message the last two characters are extended by 01 (message <= 28 characters) or are replaced by 01 (message > 28 characters).
· Generated function module name
Outbound (maximum 30 characters): ALE_function module name (default)
Inbound (maximum 30 characters): IDOC_INPUT_message (default)
· Segments
The default segment name begins with E1 for SAP and Z1 for customers, or namespace /.../. A meaningful and unique segment name is assigned as follows:
- In the application system (maximum 27 characters):
The segment name is derived from the structure name:
· If the structure name is shorter than 24 characters, the segment name is copied directly.
· If the structure name is longer than 23 characters, it is shortened to 23 and the less important characters at the front are cut off. The remaining characters are used to form a number that establishes the uniqueness of the shortened name. If numbers 01 to 99 are used, assignment continues with numbers 100 to 999 until the segment name becomes unique. This ensures that new segment names are created for the same structure, when this structure is used many times in a complex data type.
Hope thisll give you idea!!
P.S award the points.
Good luck
Thanks
Saquib Khan
"Some are wise and some are otherwise" -
Hi all,
Plz help Its very urgent!!!!!!
I have a requirement to show the data of consecutive two months in the report with the difference of two months in another column "variance".
ex: mm1/yyyy , mm2/yyyy, variance = mm1/yyyy-mm2/yyyy
I have made a new selection "&MNTH / Amount" , where in it calculates the prior month with the amount. On the new selection i need to make the amount = amount*-1 and display $0 whenever there is a blank space.
I tried achieving this with a customer exit, but could not succeed.
the final output should show
mm1/yyyy = prior month amount
mm2/yyyy = current month amount
amount needs to show negative value
the blank space should be filled with $0
Thanks
rani
Edited by: rani on Dec 27, 2007 2:08 PMhi
to show negative values for amount
Select mm1/yyyy & mm2/yyyy one by one .
Then in the properties hit the DISPLAY tab.
Then look for SIGN CHANGE.
Use "REVERSE SIGN"
do it for both keyfigures
Secondly,
Hit QUERY from the menu and then select properties
Go to Value Display tab
Here select Zero instead of space or Zero with currency unit....
Try following options until u get required output.
Let me know. -
Idoc segment field length changes
Hi friends,,
I am new to idoc.
My requirement is in my segment
i am having 5 fields and also this segment is already realeased one.
i wnat to change the field length from 10 to 20 . how to do this ?
actually what i did is
1. i cancel the release for that segment.
2. in that field inside the dataelement i changed the field length from 10 to 20.
3. data elemnt get chaged from 10 to 20 but Export length for that field in Idoc segment still retain the 10 only
can you plz how to resolve this
devaHi,
The way you used is right. ( cancel release or create a new segment )
After you cancel release, try delete that field, and insert a new one.
If it isn't valid still, create a new segment instead.
Regards
Sam -
Hi,
I'm trying to send the iDoc type 'MATMAS05' to a file port in the R/3 system. My problem is that the segments in the file start with 'E2', for example segment 'E2MAKTM'. In the iDoc type all the segments start with 'E1'.
I want to give the iDoc type definition (xsd file downloaded from WE60) to the legacy system people (so they can see the complete iDoc structure) and also to send them an example of the iDoc in a flat file form.
The segment names are different in the definition and in the example...
what can I do to solve it ? (I understand the difference between the E1,E2,E3)
Thanks, Nir.
Message was edited by: Nir MarcuHi Abraham,
Segment definition is changed whenever we add version , as you have upgraded to ECC6.0 segment definition might have change, observe the version number in we31 for segment definition and ask the other party to use that version for that segment.
Also see new release (600 for ECC6.0) is is linked with message type and basic type in we82
Regards
Vinod -
Value for IDoc Segment field SEGMENT
Hello,
In the Integration Repository, while creating Message Mapping between a flat file (inbound) & an IDoc (outbound), I'm getting an error that not all target fields are mapped. In the target structure (IDoc), each segment has a field named <b>SEGMENT</b>. Can someone please tell me what value should go here. These are not part of the IDoc but seem to be a requirement in XI message mapping.
There is also a segment called <b>BEGIN</b> (<u>Type</u> - xsd:string) which is defined as required. Please write as to what should be populated in this segment.
Any help is greatly appreciated.
Thanx in advance.
Homiar.My current scenario is
File Adapter -
> XI -
> SAP R/3 (Idoc Adapter).
I will be using FIDCPP2 IDOC.
1. For an instance following is the structure, in this case how can I achieve getting a set of data in one IDOC and another set in other IDOC based on document no.
CC Doc No. line items
UK01 456 1
UK01 456 2 -
> IDOC 1
UK03 456 3
UK04 450 1
UK04 450 2 -
> IDOC 2
UK04 450 3
i). Is there any way to create instances of idocs in XI or any alternative way out.
ii). Where/ how can I give the condition, that based on Document No. should create another IDOC instance. -
To remove leading zeroes and take directly from IDOC(Segment field) to file
Hi SapAll.
i have got a simple requirement in a idoc to file Interface.
here in a sender Idoc there will be one segment with one field,the requirement is to remove leading zeroes and take directly the data from this field and map to one of the field in reciever file structure.
i had used the formatnumber (under arithmatic functions)in PI 3.0 but now when iam using it in PI7.1 it was raising some jave exception error.
it would be preferable if any body can give me the solution without user defined functions.
regards.
Varma.from your first post:
i had used the formatnumber (under arithmatic functions)in PI 3.0 but now when iam using it in PI7.1 it was raising some jave exception error.
use the same formatting that you used in 3.0 .... try with just a # in the FormatNum function.
Regards,
Abhishek.
Maybe you are looking for
-
Lumia 720 battery detailed information
Excuse me,i try to look everywhere buy i cant find the information,can i know the maks input current for lumia 720?how many ampere can lumia take? is it useless if i use 2.1amper output?
-
Firefox 4 is loading multiple windows
After updating to Firefox 4, in addition to loading my window with all my saved tabs from the last session, it also loads additional multiple windows with a single blank tab. How do I make it stop doing this?
-
my harddrive is partitioned 50/50. 1st half has windows 7 on it and 2nd half has ubuntu 11.10. Since latest upgrade of firefox the linex runs ok. but the windows 7 will not connect and gives error "taking too longto connect" I have tried deleting fir
-
LabVIEW project files are not opening
Hai all Iam encountering a serious problem in LabVIEW 8.2, My LabVIEW is not cpable of opening the project files, i could not able to create a project file in LabVIEW 8.2, It show some messages like NIMAX encounters error and stops there, But i am a
-
Restore songs from phone to library
I have an Iphone 4S and have recently had to do a clean install on the computer that held my itunes After the install I was able to recapture about 1/3 of the songs that I had in the library. My phone has 755 songs as compared to the librarys current