cancel
Showing results for 
Search instead for 
Did you mean: 

Out put generate

Former Member
0 Kudos

Hi,

Need help with coming up with the logic for scnerio below.

Maintained condition record for EDI Order output for forwarding agents XXXX & YYYY.

Once order is created with XXXX partner, output generates, If changed to YYYY, new output is triggered and with extra coding on the EDI side, EDI team knows that to send the cancelation for XXXX & send new notice to YYYY.

If forwarding agent is ZZZZ, output doesn't generate as its not maintained in the condition record table and if it gets changed to XXXX or YYYY, output is triggered again. which is OK again.

This works in all scenarios except for the one below

Issue we are having is when Agent is XXXX and output is generated, Now if we change it to ZZZZ, we still need to send the cancelation for XXXX. Requirement is to generate same output again even though a record in not maintained as EDI will know to send cancelation to XXXX and ignore ZZZZ . We tried adding code below that if there is an entry in NAST table for this output AAAA, generate output, regardless if there is not entry in Condition record table for that agent. But its not working

if not komkbv1-vbeln is initial.
select single * from nast where objky = komkbv1-vbeln and kschl = 'AAAA'.
z_sysubrc = sy-subrc.
endif.
sy-subrc = z_sysubrc.

any suggestion as how to over come this

Accepted Solutions (1)

Accepted Solutions (1)

Jelena
Active Contributor

You can only prevent output from being generated (using a requirement routine), you can't force it to be generated if no condition record has been found. IMHO you need to re-think your output strategy with this information in mind.

I'm also a bit confused why you can't just add a condition for all the partners since there is some kind of "team" sitting in the middle anyway.

Just a thought "outside of the box" - maybe instead of simply replacing agents create a different partner type, like "Previous agent". Then you can generate automated cancellation to the previous agent and whatever is needed for the new agent. All using standard, maybe with just a little code. Then "the team" can spend their time doing something more productive.

Former Member
0 Kudos

Thanks. Your comment "

you can't force it to be generated if no condition record has been found" made it clear for me.

I added one text field Yes or No in the condition table and we will maintain the conditions records for all the Forwarding agents and add the logic, if Text field "Y", generate output , in "No" don't generate unless, there is an entry in Nast table for this Sales order.

Answers (0)