cancel
Showing results for 
Search instead for 
Did you mean: 

Help Required

Former Member
0 Kudos

Hello all,

I am doing a scenario of posting data from orders05 idoc to cxml where in I am populating the descption filed to an attribute in the cxml which is my target. Now the requirement is if the description contains more than 70 characters then in the target it should generate a new node for every 70 characters.

Now I have in the target as

Extrinsic name="FooterComments">For freight charges, fax original Bill Of Lading or Shipping Receipt and a copy of the Prepaid Freight Bill referencing the Invoice Number.</Extrinsic>

But I need it to be populated as

<Extrinsic name="footerComment">* For freight charges, fax original Bill Of Lading or Shipping Receipt</Extrinsic>

<Extrinsic name="footerComment">and a copy of the Prepaid Freight Bill referencing the Invoice</Extrinsic>

<Extrinsic name="footerComment">Number.</Extrinsic>

Please help me in this issue. can this be done with the graphical mapping?

If an UDF has to be created then can any one provide me with the UDF as I am totally unaware of Java.

Thanks for the help!!!!!!!!!!!!!!!!!

waiting for your precious replies.

Regards,

Chaitanya

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ;

Just let me know if it solved your prob otherwise we can take this discussion forward

Mudit

Former Member
0 Kudos

Hey Mudit,

I have removed the spilt by value function. it is working now.

But there is one problem I have the source coming as

Transmit an electronic copy of the invoice referencing our Purchase Order Number.

The UDF is braking the code till Or and in the next tag it is not populating from d for Order. can you please help on this.

Thanks a lot.

Former Member
0 Kudos

Hi;

Change this line

str=str.substring(<b>70</b>,str.length());

Mudit

Former Member
0 Kudos

Thank you very Much. It is working fine..

Points awarded.:))

Regards,

Chaitanya.

former_member185171
Participant
0 Kudos

Hello,

we have to map idoc orders05 to cxml. I do not have a lot of experioence with idocs not with complex mappings in pi.

Should it be possible to get some help? apparently you were able to solve this problem.

On the other hand we are wondering if - in a new project - working with idocs and pi is advisabel.

Thanks a lot.

Kris

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi ;

Yes you can do it using graphical Mapping using UDF.

UDF will be context level and input will be your text field.

String str=Test[0];

while(str.length()>70)

{

result.addValue(str.substring(0,70));

str=str.substring(71,str.length());

}

result.addValue(str);

Mapping will look like

source field -


UDF --- split by value --target field

Mudit

Award points to motivate me to help you further

Former Member
0 Kudos

Hi;

Just wanted to add that if you have the target node in teh same context than no need to split

Mudit

Award points if it helps

Former Member
0 Kudos

Hello Mudit,

Thanks for the reply. It is working partially. The first 70 characters are being substringed but for the next 70 characters should be populated in a new tag which is not happening as of now. Please help...

Regards,

Chaitanya.

Former Member
0 Kudos

Hi

Is teh new tag in the same context or different context

see the output queue of the UDF

if in the same queue the mapping will be like

Source-UDF- target

else

Source UDFSplit by value --target

Mudit