cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping

Former Member
0 Kudos

Hi all,

i have four fields. like

Country

state

Area

Code

for this fields Country field is Mandatory and other fileds State, Area, Code. here my problem is if you give state field is initial then Area and Code is not mandatory and if Area or Code is initail State is not Mandatory. how can i do mapping for this. please explain me. My scenario is SOAP to RFC

Thanks

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

i got useful answer

Former Member
0 Kudos

Thanx for the Reply Suraj, let me Correct my question

i have four fields,

1.Name (may be 'Country' or 'State' or 'Area' or 'Code')

2.State ( may be Andhra Pradesh,Maharashtra e.t.c ) the value in State Field

3.Area (may Andheri, dadar,begumpet e.t.c) the value in Area Field

4.Code (may be 123 or 234 or some unique key) the value in Code Field

Here the Name indicates, the 'Country' or the Name indicates 'State' or the Name Indicates 'Area'

or the Name indicates 'Code' i.e If the Name is Country i should list all the States in it ==> State field should not be filled,if it is filled there is no use of Specifying Name

If State or Area or Code is given then Name should not be given coz you are specifyin which State or which Area or which Code,

So i want to validate

1.If Name is not initial and if State or Area or Code is entered it should throug a error message that if Name is Specified you should not Enter the 'State' or 'Area' or 'Code'

2.If State or area or code is not initial it should through error message like Name should not be given as you've enter State or Area or Code

would appreciate your reply

regards,

Anil

Former Member
0 Kudos

Hi Anil Kumar,

As per my understanding you need to write the UDF which Accepts your four fields.

and then writhe your conditions as per you requirement.

Thanks & Regards,

Srinivas

Former Member
0 Kudos

Use 'exists' for both Name and State (or Area or code) and then use Boolean AND function to validate the results. If the AND result is false, then map the value (Means either Name or the other fields exists, not both). Else you need to raise mapping exception.

...... *should throug a error message*

Where do you want the error message to be shown? Do you want it MONI with customized error details or do you have a seperate field in the RFC table to populate error details?

Edited by: nagarjuna _s on Nov 24, 2009 7:28 AM

former_member187339
Active Contributor
0 Kudos

Hi Anil,

If you want to validate the conditions mentioned by you and need to raise exception then you shoudl follow these blogs:

http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417700%29ID0063371650DB0125886228547060379...

http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417700%29ID0063371650DB0125886228547060379...

Regards

suraj

former_member187339
Active Contributor
0 Kudos

Hi Anil,

I guess your question was not clear.. Are you saying at a time you will have either of these :

1. State alone, but no area and city

2. Area and city alone , but no state

If the above is the condition then you can use the exists function in graphical mapping and see whether the state exists or not. If it exists then take its value else go for area and city

Regards

Suraj