cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping

Former Member
0 Kudos

Hi All,

I have the following mapping queries

1.The target XSD in the message mapping is in the local software component and referencing the local software component version in the signature tab of the message mapping,I copied the xsd to other software component version but I do not know hoe to use it in the mapping as I need to change the mapping if I add newly copied xsd in the message mapping

Please help me

2.The input date format is yyyyMMdd,the output date format is yyyy-MM-dd'T'HH:mm:ss,

I implemented it using the DateTransform but the input value is different and the output value is different .

Please help me.

3.The PARTN is coming with the prefixe as 000065657676868,now I nee it without zeorszs so I implemented the UDF as

if (str == null){

return null;

}

char[] chars = str.toCharArray();

int index = 0;

for (; index < str.length();index++)

{

if (chars[index] != '0'){

break;}

}

return (index == 0) ? str :str.substring(index);

This UDF works for other fields but not for PARTN

Please help me

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

former_member472138
Active Contributor
0 Kudos
but I do not know hoe to use it in the mapping as I need to change the mapping if I add newly copied xsd in the message mapping

Ofcoz you need to edit the mapping, if you want to refer to use it in mapping.

>>>>>>>>>>

Using the standard function:DateTrans -- double click on it, Provide Input Date Format as yyyyMMdd while selecting the empty row from source date format and date separator as - you can get. Then say OK. Also provide your target date format.

>>>>>>>>>>>>>

PARTN - You need to check the data type for the field. According to that you can edit your given code.

Regard

Pothana

Former Member
0 Kudos

Hi Mark and Pothana,

Thanks for the replies.

If I drag and drop the xsd it gives an error as cannot copy to the existing local sofware component version and if I use the value help then the merged xsd message does not appear.

Do I need to map from scratch?

Thanks in advance

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

If I drag and drop the xsd it gives an error as cannot copy to the existing local sofware component version

Export the current xsd into your desktop and just create another external definition (and import the exported xsd) in your local scv.

if I use the value help then the merged xsd message does not appear.

You can also try this, in the signature tab, under target messages click the help for software component version and then look for the local scv that holds the xsd. This approach is not recommended since you can't transport objects from a local scv.

Hope this helps,

Mark

former_member472138
Active Contributor
0 Kudos

Don't use the objects of LOCAL soft comp ver in Non local soft comp objects. Since LSC Objects are not based on SLD.

If you want to create objects locally purely for testing, you can define a local software component version for this purpose. A local software component version is not based on data from the System Landscape Directory.

It may not be the good practice.

Regards

Pothana

Former Member
0 Kudos

Hi Mark an Pothana,

Thanks for the replies.

The XSD is already there in the local software component version.i copied it to some other software component version and getting the errors after trying to use it from this software componennt version.

If I use value help,then the merged xsd does not appear.

Also,for the PARTN field,the formatNum does not work.

Please help me.

Thanks in advance

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

The XSD is already there in the local software component version.i copied it to some other software component version and getting the errors after trying to use it from this software componennt version.

Have you tried exporting the xsd from the local scv and then creating a new external definition for that xsd?

Also,for the PARTN field,the formatNum does not work.

Not sure why this is not working, can you try adding


SourceField -> mapWithDefault: 0 -> formatNum: 0 -> TargetField

Hope this helps,

Mark

former_member472138
Active Contributor
0 Kudos
i copied it to some other software component version and getting the errors after trying to use

Juss check if it is still refering to the LSCV. As suggested by Mark, export to your desktop from LSCV and import it to your SCV. You will not get any errors.

Former Member
0 Kudos

Hi Pothana,

I tried but some fields are missing.

Please help me.

Thanks in advance

Former Member
0 Kudos

Hi Pothana,

The following queries are there

1.The input date format is yyyyMMdd,the output date format is yyyy-MM-dd'T'HH:mm:ss,

I implemented it using the DateTransform but the input value is different and the output value is different .
Please help me.

2.The PARTN is coming with the prefixe as 000065657676868,now I nee it without zeorszs so I implemented the UDF as 

if (str == null){
return null;
}
char[] chars = str.toCharArray();
int index = 0;
for (; index < str.length();index++)
{
if (charsindex != '0'){
break;}
}
return (index == 0) ? str :str.substring(index);

This UDF works for other fields but not for PARTN

Can you please help me?

Thanks in advacne

Former Member
0 Kudos

i guess no extra spaces are coming in the value "000065657676868"....use "trim" function before the UDF and chk

Answers (2)

Answers (2)

Former Member
0 Kudos

answered

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

1.The target XSD in the message mapping is in the local software component and referencing the local software component version in the signature tab of the message mapping,I copied the xsd to other software component version but I do not know hoe to use it in the mapping as I need to change the mapping if I add newly copied xsd in the message mapping

Please help me

For this, open your message mapping and then go to the signature tab. From there, replace the target xsd with the newly copied external definition (by dragging and dropping). Just make sure that you have selected the correct message as an xsd can contain many messages.

2.The input date format is yyyyMMdd,the output date format is yyyy-MM-dd'T'HH:mm:ss,

I implemented it using the DateTransform but the input value is different and the output value is different .

Please help me.

The input date maybe yyyyMMdd, but how is the source system actually passing it? Can you give us an example?

3.The PARTN is coming with the prefixe as 000065657676868,now I nee it without zeorszs so I implemented the UDF as

A UDF is not needed, your requirement can be achieved by using the arithmetic function called formatNum....do it like this


sourceNumber -> formatNum: 0 -> Target

Hope this helps,

Mark

Former Member
0 Kudos

Hi Mark,

Thanks for the reply

1.The target XSD in the message mapping is in the local software component and referencing the local software component version in the signature tab of the message mapping,I copied the xsd to other software component version but I do not know hoe to use it in the mapping as I need to change the mapping if I add newly copied xsd in the message mapping
Please help me
For this, open your message mapping and then go to the signature tab. From there, replace the target xsd with the newly copied external definition (by dragging and dropping). Just make sure that you have selected the correct message as an xsd can contain many messages.

The xsd is a merging of 2 xsd's,will it not impact the xsd?

Also,do I need to specifically drag and drop it or use the value help?

Thanks in advance

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

The xsd is a merging of 2 xsd's,will it not impact the xsd?

Also,do I need to specifically drag and drop it or use the value help?

Since they are copied, no You can use drag and drop or value help. It is just preference.

Regards,

Mark