cancel
Showing results for 
Search instead for 
Did you mean: 

How to block blank value of a field in message mapping in SAP pi 7.3 (Soap to RFC)

rishabh_sharma2
Explorer
0 Kudos

Please suggest how I can block a blank value coming in a field in message mappng in pi (soap to rfc scenario)

Accepted Solutions (1)

Accepted Solutions (1)

rishabh_sharma2
Explorer
0 Kudos

Hi All,

I have achieved my target by doing this mapping in which the target Item node will not be created if Sign field is empty.

and with this no space or blank value will go to Bapi structure.

Mappin screen shot

Thanks,

Rishabh

Answers (9)

Answers (9)

rishabh_sharma2
Explorer
0 Kudos

Hi Vishu,

I did as u suggest But is is showing error here.

Plz look at the screen shot below.

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Rishabh,

Just do one to one mapping for PLANT_RA node and check the output.

Regards

Vishnu

rishabh_sharma2
Explorer
0 Kudos

Hi Vishu

In this way it is giving me message mapping error

Please suggest any other mapping way.

Also tell me if Material field has 4 sub fields

Sign = I

Option = EQ

Low = 2334456677

High = 4454637382

then do I have to do mapping only in main Material fields or its sub fields also like sign, option, Low , high.

regards,

rishabh

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Rishabh,

Since the four sub fields are present under Items node, just put your logic for the Item node itself, and for its sub fields just do one to one mapping with the corresponding source fields.

For Item node(if the logic is for Low field not equal to blank, then only populate, then):

Replace MaterialTy with comparision field(eg: Low)

Replace target MaterialN with target Items node

Regards

Vishnu

Former Member
0 Kudos

Hello,

Please check this note  -

1832047 - NULL value handling in PI mapping

Thanks,

Atul

rishabh_sharma2
Explorer
0 Kudos

Actually I have removed all the mapping now but basically I want that if LOw is empty or blank it should pass to the target Low field.

pvishnuvardan_reddy
Active Contributor
0 Kudos

Rishabh,

If your requirement is if LOw is empty or blank it should pass to the target Low field, then just remove Not Boolean function from the below mapping:


Replace field1 with Low field

Replace header field with Low field

Regards

Vishnu

rishabh_sharma2
Explorer
0 Kudos

It is getting mapping error

rishabh_sharma2
Explorer
0 Kudos

Hi Vishnu,

The screen shot i have pasted is not working. The requirement is simple

If a field is blank I donot want to pass is to target structure.

Can u please explain me its mappin in detail

Rgds,

rishabh

pvishnuvardan_reddy
Active Contributor
0 Kudos

Rishabh,

Can you let me know the output you are getting using your mapping.

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Rishabh,


Using EQUALS text function check whether the input is having blank value or not, pass this output to a NOT Boolean function and then the output of this to a IFwithoutElse  boolean function, the other input of the IF is the input field only. Pass this to the target field.

Regards

Vishnu

rishabh_sharma2
Explorer
0 Kudos

Hey Hareesh,

Suppose there are 4 fields to send an input to a RFC via SOAP UI -- i.e Material, Vendor, Storage Location, Posting date. etc (no field is mandatory)

I can send input in 1 field also or 4 fields also.

so if I am sending data in material field only. then bapi is assuming some value for vendor, storage Location, plant, Posting date etc. and throwing an error that

this plant doesnot exist

this vendor doesnot exist

this storage location doesnot exist

etc


so I want to do a mapping in which if a field is filled with input value  in source structure then  only it should populate the value in target structure or it should not pass blank value to target structure if no input data is passed in it.


Please suggest what node function or UDF  i have to do use in this.


Regards,

rishabh

Former Member
0 Kudos

Hi ,

Use IFS node function .It will suppress the o/p field .

InpFieldVal-->equals(empty)(Text)-->Not-->IFs-->Target field.

Regards

Venkat

rishabh_sharma2
Explorer
0 Kudos

Hi Vishnu and Venkat,

I have done like this

is it write or wrong

also please tell the fields in input structure are like i.e Material number (sign,option, low, high)

Suppose I am not passing any value in low and high, still bapi is assuming value as Sign = I

    and Option = EQ ...........................................which  Ideally should not come

It should be like only is Low field is not blank then SIGN or

OPTION FIELDS should be filled.

Please suggest me on this. The below mapping is done by me on my previous requirementPlease chech whether I have done right or not.

Thanks,

rishabh

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Rishabh,

Yes, the mapping screen shot is fine.

Reg your query, can you let us know few more details to understand correctly.

pvishnuvardan_reddy
Active Contributor
0 Kudos

Rishabh,

Reward points if solution is found useful.

Regards

Vishnu

former_member183816
Active Participant
0 Kudos

Use createif in place of if then.

former_member183816
Active Participant
0 Kudos

source node ==>(field exist and field does not have empty valuecreateif  ==>  target node

bold are present as standard functions in mapping.

Repeat for all nodes/fields, which you don't want to get created.

former_member184720
Active Contributor
0 Kudos

What do you mean by block? you want the message to fail in the mapping?

If so just check if the length of the field is > 0 and use create if to map it to any mandatory field(1..1) on the target side.