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: 

Reg : EDI Isuues

Former Member
0 Kudos

Hi Frens,

This is Amit.

I have created 4 message type having orders05 structure.

I have assigned 4 output type corresponding to Message type.

I have written 4 requirements for corresponding output types.

My issue is that when i am trying to issue output from vao2 , item level ..output type should come automatically to screen in the output screen.

I dont want to do it manually.

Needed help.

13 REPLIES 13

Former Member
0 Kudos

Hi Amitav,

Have you:

- assigned the output types to an output determination procedure?

- assigned the output determination procedure to an order type?

- created output condition records for the output type?

If you have done these three, click on the determination analysis button in the order item output screen. This will show you what critera it has used to search for output condition records. This should help you to determine why none are found.

You may find that your requirement is failing? This is also represented in the determination analysis.

Hope that helps.

Brad

Former Member
0 Kudos

Hi Brad,

Thanx for response.

I have done all the setting , but it is is not coming automatically.

Manually i am doing repeat output or entering values manually.

One more thing , i have to pass the name to idoc who changed the sales order.

Hope it is in nast-usnam.

i am assigning this value in user exit called EXIT_SAPLVEDC_004 which is in idoc_order_ordrsp.

in DXVBAK structure of 'EXIT_SAPLVEDC_004' is having one field ERNAM.

but it is not reflecting in idoc. I am checking all the segments.

which segment to fill this.

please suggest for the proceedings.

Regards,

Amitav

0 Kudos

Hi Amitav,

One thing at a time. Lets get the output then lets worry about the username.

Did you try:

> click on the determination analysis button?

This should tell you a lot about why your message is not appearing automatically.

Brad

0 Kudos

Hi Amitav,

For the username issue, I think you are correct in taking NAST-USNAM. This should be the user who changed the order.

In the idoc, I would suggest that you extend one of the segments to add the user who changed the order. The header segment is probably the easiest one for this. Once you have added this field to the segment you can then populate it via a userexit.

Hope that makes sense.

Brad

Former Member
0 Kudos

Yeah I got some info from determination analysis.

Below are the details.

Actually i am issuing four output types ZCAN , ZCHG , ZCRE , ZCOM.

ZCRE- ORDER Creation

Zchg - Change

Zcom - Complete

zcan - cancellation

Condition type Message Description

ZCAN 502 Output ignored (requirement 904 not fulfilled)

ZCHG 541 Output found

ZCHG 544 Message cannot be transmitted more than once

ZCOM 541 Output found

ZCOM 514 No processing program defined for output ZCOM (medium A)

ZCRE 541 Output found

ZCRE 544 Message cannot be transmitted more than once

0 Kudos

Hi Amitav,

So you can tell a lot from this info:

> ZCAN 502 Output ignored (requirement 904 not fulfilled)

Your requirement is causing a condition record that would normally produce an output to fail. Put a breakpoint in your code(and go back into change mode for the order) to determine exactly why.

> ZCHG 541 Output found

> ZCHG 544 Message cannot be transmitted more than once

The output condition record was found, but has already been automatically been determined. One message has been sent so it wont send another. If you create a new order (or order line as you said this output was at line level) it will generate a new one. If you really want a new message every time you change the order (this can create a mess when users just change a text for example) then select the multiple issueing flag on the output condition type in SPRO.

> ZCOM 541 Output found

> ZCOM 514 No processing program defined for output ZCOM (medium A)

Output was found, but in configuration you need to configure a program to generate the idoc for this message type and output medium (A for ALE). Again this is via SPRO

> ZCRE 541 Output found

> ZCRE 544 Message cannot be transmitted more than once

Same as for ZCHG.

That should help you a lot with automatic determination.

Cheers,

Brad

Message was edited by: Brad Williams

Former Member
0 Kudos

Hi Brad ,

I have created the 4 message type having same structure orders05.

And i also used process code sd10.

I have to do all the coding in function module idoc_output_ordrsp.

which exit i have to use for this.

should i implement the coding in EXIT_SAPLVEDC_004 , for additional data.

Regards,

0 Kudos

Hi Amitav,

The exit you want to use is: EXIT_SAPLVEDC_002.

It is called after each time that SAP fills an idoc segment.

What you should do is extend the segment e1edk01 in idoc orders05, and then just after SAP fills the segment e1edk01, it will call EXIT_SAPLVEDC_002, which you can then use to put the username in.

Hoep that helps.

Brad

Former Member
0 Kudos

Thanx Brad.

Really It helped me a lot to solve the issue.

Once again thanx.

0 Kudos

No problem Amitav,

Please feel free to acknowledge that by rewarding some points!!

If you flag one of my responses as "solved problem", or "very helpful, or "helpful" then others can see that this information is useful, and also I can get some recognition for helping you out!!!!

Good to see that your problem is solved though.

Brad

0 Kudos

Hi Amitav,

Thanks for awarding the points. The last thing to do is click 'Solved it on my own' (and perhaps also provide a brief explanation) so that the thread is closed. This helps by:

- people know whether to continue to try and help (from the overview screen, without having to drill down)

- people can use the thread as a reference when looking for answers.

Brad

Former Member
0 Kudos

Hi Brad ,

Good morning.

I am having one query , putting it down.

Idoc to be issued everytimes changes occur in a sales order.

can i use cdhdr or cdpos table in my requirement (VOFM).

or is there any fields are available in communication structre ( kompbv1 , komkbv1).

Thanx and regards,

0 Kudos

Hi Amitav,

This is a tricky one.

There is a field that it set within SAPMV45A processing (r185d-dataloss) which is set to X if a standard SAP field hase been changed in the order.

So, here is what I would suggest you do:

1. set up your output condition type as 'multiple issueing'. This will ensure that every time you go into change a sales order the output type is proposed

2. In the userexit USEREXIT_SAVE_DOCUMENT_PREPARE I would export to memory (using the sales order number as the key) the value of r185d-dataloss

3. In your requirement import from memory the value of the field r185d-dataloss (clearing the memory entry afterwards)

4. If the value is X then pass the requirement, otherwise fail it

This way, your requirement will always reject the output type until the document is saved. If it is saved and there were changes, during update processing the requirement will pass and the output will be generated.

If you want to avoid IMPORT/EXPORT from memory then you could use the technique described in my blog: /people/brad.williams/blog/2005/04/25/userexits--how-do-i-access-inaccessible-data

Hope that that makes sense.

Cheers,

Brad