cancel
Showing results for 
Search instead for 
Did you mean: 

Segment is not working

vijender_p
Active Participant
0 Kudos

Hi all,

I am working on a interface in the which the logic is as follows .

In the which when the Z1P1208 segement Exists then it should get records

with the which the PLANS from E1P0001 and OBJID from the E1P00105

should get the data means the queue should be true or else the queue should be false .

But Actually what happening is the logic is not working as when the Z1P1208 segment is not coming into the PI system .

for the which i have written logic for  get record is

String a = " " ;

String flag = " " ;

for(int i=0 ; i<var1.length;i++){

if(var1[i].equals("true")){

for(int j=0;j<var2.length;j++){

flag = "";

for(int k=0;k<var3. length;k++){

if(var2[j]==var3[k])

{

a="true";

result.addvalue(a);

flag= "X";

break;

}

}

}

}

}

please help me out

Regards,

vijender

Accepted Solutions (1)

Accepted Solutions (1)

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Vijender,

I have corrected the code. Try this out:

String a = " " ;

String flag = " " ;

for(int i=0 ; i<var1.length;i++)

{

    if(var1[i].equals("true"))

    {

       for(int j=0;j<var2.length;j++)

       {

          flag = "";

          for(int k=0;k<var3. length;k++)

          {

            if(var2[j]==var3[k])

             {

                 a="true";

                 result.addValue(a);

                 flag= "X";

                 break;

             }

          }

       }

    }

    else

       result.addValue("false");

}

Regards

Vishnu

vijender_p
Active Participant
0 Kudos

Hi Vishu ,

thanks for the reply . But, the Code you have mention is reflecting the same logic as for the first time .

please  can u check once

regards,

vijender

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Vijender,

I have checked with the below test case and the udf is giving the output as per your requirement. Can you cross check once from your end. If possible, can you please share me the screen shots for better understanding.

Regards

Vishnu

vijender_p
Active Participant
0 Kudos

Hi vishnu,

Thanks once again.

can you please find check with the screen shot i have mentioned .


but also the Queue remains same as above

Regards,

vijender

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Vijender,

Can you let me know the occurrences of the below in the IDOC.

Z1P1208


PLANS from E1P0001 and OBJID from the E1P00105

Regards

Vishnu

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Vijendar,

The udf screen shot you have mentioned is fine.

Can you please share the screen shot of the display queue of the test case where you are having the issue.

Also, let me know the occurrences of the below in the IDOC.

Z1P1208

PLANS from E1P0001 and

OBJID from the E1P00105


This could help us to resolve the issue quickly..


Regards

Vishnu

vijender_p
Active Participant
0 Kudos

Hi Vishnu ,please find the queue for the following.

  1. this Queue for exists from Z1P1208 segment

2. This Queue for PLANS

3. This Queue for OBJID

4. This Queue for get Records.

And also the Idoc occurance is 1 to unbounded (999999) .

please help me out .

Regards,

vijender

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Vijender,

Can you please let me know where exactly you are facing issue.

Since if I understand correctly, your requirement is when Z1P1208 segment exists & PLANS from E1P0001 segment is equal to OBJID from  E1P00105 segment, then you need the output to TRUE or else FALSE.

So, as per this requirement, you are getting the output as TRUE when the positive test case is getting executed.

Please share the details of the issue you are encountering.

Regards

Vishnu

vijender_p
Active Participant
0 Kudos

Hi Vishnu ,

The main issue is as per the logic  in the negative test cases it is not working

when the IDOC is triggered from the R/3 System .


pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Vijender,

I could not find any issue in udf code for the negative test case.

Can you please share the screen shots of negative test case display queues to dig on the issue that you are encountering.

Regards

Vishnu

vijender_p
Active Participant
0 Kudos

Thanks ,

And the code is working good now

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Vijender,

Can you please reward points for the helpful replies, which would help other SCN members..

Regards

Vishnu

vijender_p
Active Participant
0 Kudos

i have already rewarded vishu can u please help me out in another issue of my please

Answers (0)