Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC conversion rule : Help required for Special conversion routine

sanjana_lingras
Active Participant
0 Kudos

hi

I need help regarding SAP IDOC conversion rule. We have a conversion rule for the Instruction Key (DTAWS) field set for CREMAS IDOC to convert value of this field to value "20". We have created this rule in BD79 for the field DATSW. Now we want this rule to be exempted for specific vendor code.

Like for e.g. LIFNR = '23423423' then rule should not be applied or DATWS field should not converted to value "20".

For this we can write special conversion routine and assign it in BD79.

Can anybody help me for handling this scenario in special conversion routine and explain how the above scenario can be handled?

Please help .

Thanks,

Sanjana

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Sanjana,

in the maintenace screen of BD79 you can use additional sender fields for conditions. The logic than can be implemented within conversion routines.

The conversion routiens needs to be created with function builder with the same interface like e.g. CONVERSION_EXIT_ALPHA_INPUT.

The naming of this new conversion routines is

CONVERSION_EXIT_<name>_INPUT

or

CONVERSION_EXIT_<name>_OUTPUT

Regards

Robert

15 REPLIES 15

former_member192109
Participant
0 Kudos

Hi Sanjana,

          Check if the link below helps.

<link to blocked site removed by moderator>

Regards,

Umar Syed.

Message was edited by: Thomas Zloch

sanjana_lingras
Active Participant
0 Kudos

Can anybody help in the above scenario of IDOC special conversion routine? Points will be rewarded for helpful answers.

Thanks,

Sanjana

Former Member
0 Kudos

Hi Sanjana,

in the maintenace screen of BD79 you can use additional sender fields for conditions. The logic than can be implemented within conversion routines.

The conversion routiens needs to be created with function builder with the same interface like e.g. CONVERSION_EXIT_ALPHA_INPUT.

The naming of this new conversion routines is

CONVERSION_EXIT_<name>_INPUT

or

CONVERSION_EXIT_<name>_OUTPUT

Regards

Robert

0 Kudos

Hi Robert,

I have tried creating this conversion exit CONVERSION_EXIT_<name>_INPUT, but my problem is conversion rule is created for DTAWS field and it is working. Now I want to restrict this conversion on value of the field LIFNR. i.e. if LIFNR = '232343423' then DTAWS field should be set to blank. So finally for the particular vendor DTAWS field should not be converted into value 20 ..it should remain as it is.

How can I implement this in special conversion routine.IDOC segment I am using for this rule is E1LFA1M.

Points will be rewarded, pls help.

Thanks,

Sanjana

0 Kudos

Hi Robert,

I have tried creating this conversion exit CONVERSION_EXIT_<name>_INPUT, but my problem is conversion rule is created for DTAWS field and it is working. Now I want to restrict this conversion on value of the field LIFNR. i.e. if LIFNR = '232343423' then DTAWS field should be set to blank. So finally for the particular vendor DTAWS field should not be converted into value 20 ..it should remain as it is.

How can I implement this in special conversion routine.IDOC segment I am using for this rule is E1LFA1M.

Points will be rewarded, pls help.

Thanks,

Sanjana

0 Kudos

Hi Sanjana,

in BD79 you have "Sender fields for conditions" --> see

Than setup your condition or if it is more complex, you can use a conversion routine here as well.

Regards

Robert

0 Kudos

Thanks for the reply.

I have already tried this option but it did not work.

Just one more question, as per ur solution in BD79 , I will need to apply rule on DTAWS using rule type Copy Sender Field.

And then I can give my condition for LIFNR inside it right?

I did try this solution already.

Can you just let me know how can we chnage or set value inside the speacial conversion routine CONVERSION_EXIT_<name>_INPUT here?

0 Kudos

Hi Sanjana,

yes with option Copy Sender Field....

In the conversion routine function modules you have the interface input and output where you receive and send the values.

Thats all!

Regards

Robert

0 Kudos

Hi Robert ,

My issue is solved by using your solution.

Thanks for the help.

Thanks,

Sanjana

Former Member
0 Kudos

Hey Guys,

You can do this without conversion routine also. I did it, you can refer this link,

http://scn.sap.com/message/15107381#15107381

0 Kudos

Sorry for disturb,

I've similar request,

I want the Partner function change from WE to ZW, when condition is PARTN is not zero.

I saw that you can set the condition with new checking field "Global" = CN40 in the attachment.

However may I know how to add it?

I can't see any button can add it....

my receiver field is PARVW

condition is field PARTN is not ZERO from sender.

thank you very much.

Terry

0 Kudos

Hi Sanjana,

You don't need to write Special conversion routine for this. Please try as shown in below snippet,

In your case, receiver field =  DATSW and instead of plant in above screen use LIFNR = '23423423'.

Hope it helps.

BR,

KangArun

0 Kudos

Thanks for your help,

However, I cannot find any button or option for input the field "Plant", which is different from my sender field.

Actually, my requirement is, if the PARTN is ZERO, then not convert the partner function PARVW from WE to a new function.

is it possible? coz if the condition not fulfilled, there is only below options:

- set at initial value

- classify as error

- set constant

- Copy sender field

but no option - NOT copy.

0 Kudos

Hi,

Configured BD79 settings for you in the attachment, hope it is clear. Please click on image to see values in proper resolution

0 Kudos

Great thanks for your help and instruction,

it is very clear to me,

however I got trouble coz once I go into the condition and make the change of columns and rearrange them, there is no save button, I click Back and then once I go inside again.

the columns changed... and I got error when Partner not zero.

but if Partner is ZERO, then it not copy the WE to ZW...

may I know what wrong with my condition setting?