cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC text

former_member869
Participant
0 Kudos

Hello PI Experts,

The Scenario I have is SOAP-IDOC,for which I need to capture the text and send it to the IDOC PREQCR1.PREQCR101

and to the segment E1BPMEREQITEMTEXT->TEXT_LINE,the text should capture in TEXT_LINE.

Now the TEXT_LINE has restriction with 132 characters at  R3 end,so I followed the following  blog to increment the segment dynamically from PI

http://scn.sap.com/thread/3765738.

I have already maintained the condition for E1BPMEREQITEMTEXT as attached in the screenshot.

Anyone please suggest how to join the condition for PRLINE and also for the incoming text.

Note:I have tried with IFWITHOUTELSE condition as said in the thread,it throws exception as cannot cast boolean.

The IDOC which I am using is standard IDOC

Regards,

Rama.

Accepted Solutions (1)

Accepted Solutions (1)

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Ram,

Can you try this udf code.

int q=0;

int r=0;

q = (input[0].length())/132;

r = (input[0].length())%132;

if(r>0)

  q++;

r=0;

for(;q>0;q--)

{

  if(q!=1)

  {

  result.addValue(input[0].substring(r,r+132));

  result.addContextChange();

}

  else

    result.addValue(input[0].substring(r));

}

Try this out and let me know if you are facing any issues.

Regards

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Ram,

In addition to Mark Dihiansan's comment in the thread, kindly maintain public String splitString.....etc as the udf in place of void and see if it works.

Kind Regards,

Souvik