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

Former Member
0 Kudos

We have an Orders IDOC that we are sending to our customers.

The requirement here is, some of the IDOC's are needs to be released Immediately to our partners, based on the Amount (If the Amount Specified is Greater than "X" ), if not we want to collect those IDOC in the R/3 Application file system and want to release them at later stage. Whether it is Possible to do that?

If so how to do that please?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

If you use my option. You need to create the following: -

2 Output Condition Types

2 Output Requirement programs linked to the above named conditions types. Linking one program to one condition and the other program to the other condition. These conditions programs will check the qty value and set the field SY-SUBRC = 4 if the output is not required.

Amend the partner profile(s) to have these two messages of which one is set to immedielty the other set to collect.

10 REPLIES 10

Former Member
0 Kudos

Please Help me. thanks.

ferry_lianto
Active Contributor
0 Kudos

Hi,

Is the amount value available in the one of IDoc segment?

If it is then perhaps you can build a custom program to select all corresponding IDoc(s), read the IDoc content using FM IDOC_READ_COMPLETELY and validate the amount for each IDoc.

If the amount is greater than <check value> then you pass the corresponding IDoc(s) to the program RSEOUT00 using SUBMIT statement in order to release/send the IDoc(s) to your customer.

Please ensure your order outbound partner profile is setup to collect IDocs instead of trigger immediately.

Regards,

Ferry Lianto

0 Kudos

Thanks Ferry. Yes the Amount Field is available in the IDOC itself.

I am not clear with the following point you mentioned

If it is then perhaps you can build a custom program to select all corresponding IDoc(s), read the IDoc content using FM IDOC_READ_COMPLETELY and validate the amount for each IDoc.

Once an IDOC is created in our R/3 System, we want to decide whether we are going to send them Immediately or we are going to send at a later time.

So I I have understood you properly, you are asking me to use the FM IDOC_READ_COMPLETEly, that will look into the IDOC and will decided whether that IDOC has to be send immediately or at the later stage.

-


Coming to the other answer, he says I can create two message types for Immediate Processing and for later Processing. How to do that.

-


Comparing the above two techniques, which one will be easy and cost effective?

Thanks

Former Member
0 Kudos

You could try with an Ouptut Requirement program. However it is the value of NAST-VSZTP that you would need to change.

If you cannot change the value of this NAST field. The only other option may be to have two seperate message types: -

ORDERS

ORDERS_COLLECT

The output requirement programs can be set at Output Condition level. You would have an output condition for each message. Then you would check the value in question.

If you return the field SY-SUBRC = 4 in the output requirement programs then this will stop the output being proposed.

Former Member
0 Kudos

If you use my option. You need to create the following: -

2 Output Condition Types

2 Output Requirement programs linked to the above named conditions types. Linking one program to one condition and the other program to the other condition. These conditions programs will check the qty value and set the field SY-SUBRC = 4 if the output is not required.

Amend the partner profile(s) to have these two messages of which one is set to immedielty the other set to collect.

0 Kudos

Martin Thanks a bunch.

How does a Message type and Output condition types are different? are they same?

So you are asking me to create two message type. One for Immediate Processing and other one for collection.

Once we create two separate Message types, what exactly the ABAP programer has to do with that?

Thanks again.

0 Kudos

Yedi,

Creating message types is the job of an ABAP programmer. If you want immediate processing or collection, you just need to check that in the partner profiles for those message types.

Once IDOCS are collected RBDMIDOC program will process all those idocs periodically.

Rgds,

Naren

ferry_lianto
Active Contributor
0 Kudos

Hi,

You are correct for understanding my idea ...

-


Coming to the other answer, he says I can create two message types for Immediate Processing and for later Processing. How to do that.

I am not familiar with Martin's proposal solution using message type ORDERS_COLLECT (it doesn't exits in my system ECC 5.0). But nothing wrong to try with Martin's help.

-


Comparing the above two techniques, which one will be easy and cost effective?

I can not answer this question as I am not familiar with message type ORDERS_COLLECT. But for my solution, you can code the program for less than an hour and perform quick unit testing

Regards,

Ferry Lianto

Former Member
0 Kudos

Sorry I wasn't clear. The two message types should be: -

ORDERS

ZORDERS_COLLECT

You will need to create a bespoke IDoc message.

If you write a program to read the IDoc data. How often do you want this program to run. Remember you want IDocs to be sent immedietly. Also how many Idocs are to be created.

If it was me I would use two message types.

0 Kudos

Thank you Martin and Ferry for educating me. I will talk to my ABAP Team and will let them know your view points and will come back to you again.

Thanks for your Help. Appreciated.