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: 

E1EDP05 segments not being created in outbound quotes

paul_pendleton
Participant
0 Kudos

I am facing a problem while triggering outbound IDOC for quotes. It's not creating the E1EDP05 segment. The quotes are based on ORDERS05 and I do not want to effect any other document type with any changes. I am not real sure of anything on the config side. It makes it easier for me if the system can create these segments then I can tweak them if I have to.

I do not want to make the e1edp05 segment start working for quotes and at the same time have them start showing up on orders, POs or whatever else uses orders05.

We have some pricing that is "manually" entered so the kperc field gets calculated on the fly. While testing my quote output it seemed as if the system would go through even the pricing routine(requirement) code. If this is the case then getting this to work would do everything I need it to do.

I am being told that producing them on the quotes outbound types would cause it to be produced for all types that use orders05

If anyone can help I would apprecaite it.

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos

Hi Paul,

I would suggest to work with SD functional on these.

Regards,

Ferry Lianto

20 REPLIES 20

Former Member
0 Kudos

ORDERS05 is your IDOC type, but with each IDOC type you will also have a message type that is unique even though they use the same IDOC type. So for sales orders and purchase orders, you will use ORDERS05 and message type ORDERS, but for order changes, creates, quotations etc. So in your config you have to specify that this segment should be there only for message type QUOTES and not for ORDERS. If you are manually adding this segment, then in the user exit you will have to check if the message type is QUOTES.

0 Kudos

So how is the system configured to do this. I have worked with our group that does the configuration for this but they do not know how to do it. How can I tell them to do it? Where do I go to confgure this on the system? Thanks for response.

0 Kudos

There are couple of things to verify before you configure. This segment is an optional segment which means, if there is data for this segment , you will see this segment in the output IDOC if not, you will not see it. So first verify if this data is getting filled.

Second this to verify is in the IDOC_OUTPUT_ORDERS, check if this segment is coming as a segment to read in debugging. You can check this in debugging in the following two PERFORMs that are called at the very beginning.


*- determine idoc-view -----------------------4.6A---------------------*
  PERFORM DETERMINE_IDOC_VIEW.
*- determine which application records are read -----------------------*
  PERFORM SEGMENTS_TO_READ_SET.

Some user exit may be explicitly deleting this segment without looking at the message type. Check for those. Look at BD4* transactions and BD5* transactions to see if there are any filter object or reduced message types are defined.

Best way to determine the approach is to first debug this function module and see what is happening in the above two PERFORMs.

0 Kudos

Well if I am not mistaken the information that is supposed to go in this segment is pricing information. As far as the quote is concerned there is data. When debugging it the internal table that is supposed to have values does not contain any. However I think it is because there is some configuration that has to be done to tell the system to consider putting this segment out for this doc type. Might be wrong but there are a lot of flags etc it seems to be checking when I watch it through the code.

IDOC_OUTPUT_ORDERS is not the correct one. Quotes uses IDOC_OUTPUT_QUOTES. I think there are 8 user exits and none of them were being used since we have just implemented them and I am the lucky one that gets to do the coding. So they are not getting deleted inadvertantly.

I will check the BD5* t-codes to see they have. I'm not sure what filter objects or reduced message types are so will have to learn something new.

So are you saying there is nothing special to configure on the system to get SAP to output the E1EDP05 segment for quotes?

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please try this for basic configuration IDoc QUOTES.

1. Go to transaction NACE.

2. Select V1 - Sales

3. Click on Condition Record

4. Select AN00 - Quotation (or you can ask SD functional to create custom one to meet the requirement)

5. Click on Condition Record (here you can enter condition record for certain sales org. and customer with medium = A (ALE))

6. Setup Outbound Distribution Model (BD64) for message type QUOTES.

7. Setup Outbound Partner Profile (WE20) for message type QUOTES with IDoc type ORDERS05. In the message control tab, you can use application V1, message type AN00 and process code SD12.

And now you should be able to generate outbound IDoc from sales order.

I may miss something but you should be able to figure out.

Regards,

Ferry Lianto

0 Kudos

We are currently producing 845/843 quote ouput. The system is configured to do that now. My problem is that the E1EDP05 segment is not being produced and I want to produce it but I do not know how to do that. I can see that IDOC_OUTPUT_QUOTES function module contains logic to produce the E1EDP05 segments but something is not set correctly in the system or something because they are not being produced.

0 Kudos

Hi,

We are also sending outbound Quotation IDOC. The segment E1EDP05 is populated in IDOC. You are using correct message type (QUOTES), process code ( SD12) and IDOC (ORDERS05).

This is the program flow to populate segment E1EDP05 segment.

FM IDOC_OUTPUT_QUOTES --> PERFORM FILL_IDOC_INTTAB --> perform fill_item_segments --> perform fill_item_cond.



Here it first calls "

perform get_item_prices

" If table IKOMVD gets populated in this routine, the segment E1EDP05 gets populated using perform fill_e1edp05.

See this code:

*&---------------------------------------------------------------------*
*&      Form  FILL_ITEM_COND
*&---------------------------------------------------------------------*
*       füllen der Segmente E1EDP04 und E1EDP05                        *
*       fill the segments E1EDP04 and E1EDP05                          *
*----------------------------------------------------------------------*
form fill_item_cond.

*-- Position - Konditionen abholen ------------------------------------*
*-- determine item conditions -----------------------------------------*
  perform get_item_prices
    using xvbap-posnr.
*---Position - Steuern ermitteln --------------------------------------*
*---item taxes --------------------------------------------------------*
  loop at ikomvd
    where kposn eq xvbap-posnr
    and   koaid eq 'D'.
    if ikomvd-kstat eq ' ' and
    ikomvd-kinak eq ' '.
*---Position - Steuern senden -----------------------------------------*
*---send item taxes ---------------------------------------------------*
      perform fill_e1edp04.
      perform customer_function.
    endif.
  endloop.
*-- Position - Konditionen --------------------------------------------*
*-- item conditions ---------------------------------------------------*
  loop at ikomvd.
    if ikomvd-kstat eq ' ' and
    ikomvd-kinak eq ' ' and
    ikomvd-kwert ne '0'.
*---Position - konditionen senden -------------------------------------*
*---send item conditions ----------------------------------------------*
      perform fill_e1edp05.
      perform customer_function.
    endif.
  endloop.

endform.                               " FILL_ITEM_COND
*&---------------------------------------------------------------------*

Debug this function module while processing the IDOC using WE19 and see why the the segment is not getting populated.

Let me know if you have any question.

Regards,

RS

ferry_lianto
Active Contributor
0 Kudos

Hi Paul,

Please check perhaps there is reduced IDoc (BD56) was setup or any user exits to supress the segment.

Also perhaps you can do debugging on FM IDOC_OUTPUT_QUOTES via transaction WE19 to see why segment E1EDP05 is supressed.

Regards,

Ferry Lianto

0 Kudos

Ferry,

I have been debugging that but there is so much code there to try to figure that out. Was hoping someone else ran into this before.

0 Kudos

Please look at the PERFORM statements in IDOC_OUTPUT_QUOTES as well. This is where system determines which segments to include and which ones to exclude.

Apart from that I will also look at any user exits that are deleting this segment without first checking the message type.

0 Kudos

Also, check if your condition records satisfy these conditions

    if ikomvd-kstat eq ' ' and
    ikomvd-kinak eq ' ' and
    ikomvd-kwert ne '0'.

It should not be a statistical condition type, it should not be inactive and it should not have a 0 amount. Only then the segment will be created.

0 Kudos

the ikomvd table that comes back into the fill_item_cond does not contain any data. The loop that is supposed to create the segment is the following:

loop at ikomvd.

if ikomvd-kstat eq ' ' and

ikomvd-kinak eq ' ' and

ikomvd-kwert ne '0'.

---Position - konditionen senden -


---send item conditions -


perform fill_e1edp05.

perform customer_function.

endif.

endloop.

Well there are no entries in ikomvd so it falls out. Do not know why there is no data in the table. I think it is because something needs to be configured on the system for it to load it but not sure. Guess I'm going to have to just create it myself.

ferry_lianto
Active Contributor
0 Kudos

Hi Paul,

I don't like either debugging but sometime as technical folk has no choice to do the hardest way

Why don't you set break point at form fill_e1edp05?

From here you check whether segment E1EDP05 get populated or not.

Regards,

Ferry Lianto

0 Kudos

It is not that I don't like debugging, it is that time is not on my side. Hoping forum will help with faster answer. I have set a break point there. Actually that is not where the detail is found. It is the form before that where this is called that all the data gets loaded. I have done that and it uses a FM to get this data and then that FM uses another FM and then that one uses another FM etc. Running up against time so just trying to get some help. thanks!

ferry_lianto
Active Contributor
0 Kudos

Hi Paul,

I would suggest to work with SD functional on these.

Regards,

Ferry Lianto

0 Kudos

Done that too. Thanks for trying. They ask me just as many questions as I'm asking you!

0 Kudos

There is also a BADI in this, see if they have code in there. I know you told us that this is the first time you are implementing this, but as you see most of these user exits and BADIs are in common includes and may be someone wrote something in a user exit thinking that it is used only for that message type.

0 Kudos

Ok, if you don't even have data in this internal table then it must be something on the data extraction (read) side. Look at the following code and focus your debugging there.


  IF ekko-bstyp NE bstyp-kont AND ekko-stako EQ space.
    LOOP AT xekpo.
      MOVE xekpo TO ekpo.
      REFRESH tkomvd.
      CHECK xlpet EQ space.
      CHECK ekko-knumv NE space.
      CHECK ekpo-netpr NE 0.
      CHECK ekko-bstyp EQ bstyp-lfpl OR
            ekko-bstyp EQ bstyp-best.
      IF ekko-bstyp EQ bstyp-best.
        CHECK ekpo-netwr NE ekpo-brtwr.
      ENDIF.
      IF ekko-bstyp EQ bstyp-lfpl.
        CHECK ekpo-zwert NE ekpo-brtwr.
      ENDIF.
      CHECK ekpo-prsdr NE space.
      CLEAR: komp.
      komk-mandt = ekko-mandt.
      IF ekko-kalsm NE space.
        komk-kalsm = ekko-kalsm.
      ELSE.
        komk-kalsm = 'RM0000'.
      ENDIF.
      komk-kappl = 'M'.
      komk-waerk = ekko-waers.
      komk-knumv = ekko-knumv.
      komp-kposn = ekpo-ebelp.
      komp-matnr = ekpo-matnr.
      komp-werks = ekpo-werks.
      komp-matkl = ekpo-matkl.
      komp-infnr = ekpo-infnr.
      komp-evrtn = ekpo-konnr.
      komp-evrtp = ekpo-ktpnr.

* fill quantities
      IF ekko-bstyp EQ bstyp-best.
        komp-mglme = ekpo-menge.
      ELSE.
        komp-mglme = ekpo-ktmng.
      ENDIF.
      IF komp-mglme EQ 0.  "falls keine Menge gesetzt --> auf 1 setzen
        komp-mglme = 1000.  "z.B. bestellte Banf nochmal bestellt
      ENDIF.

* convert quantities if price unit differs from order unit
      IF ekpo-meins NE ekpo-bprme.
        IF ekpo-bpumn NE 0.
          komp-mgame = komp-mglme * ekpo-bpumz / ekpo-bpumn.
        ELSE.
          komp-mgame = komp-mglme.
        ENDIF.
        komp-umvkz = ekpo-bpumz.
        komp-umvkn = ekpo-bpumn.
        komp-vrkme = ekpo-bprme.
      ELSE.
        komp-mgame = komp-mglme.
        komp-vrkme = ekpo-meins.
      ENDIF.
      komp-meins = ekpo-lmein.
      komp-lgumz = ekpo-umrez.
      komp-lgumn = ekpo-umren.
      komp-lagme = ekpo-meins.
      komp-kursk = ekko-wkurs.
      komp-ix_komk = 1.
      CALL FUNCTION 'RV_PRICE_PRINT_ITEM'
        EXPORTING
          comm_head_i = komk
          comm_item_i = komp
          language    = ekko-spras
        IMPORTING
          comm_head_e = komk
          comm_item_e = komp
        TABLES
          tkomv       = tkomv
          tkomvd      = tkomvd.<----
    ENDLOOP.
  ENDIF.

This is there in the FORM lesen_beleg.

0 Kudos

OK, we were going in the wrong direction. It is not the EDI configuration but the pricing procedure configuration that decides whether or not to send the pricing information in the output (print, email, EDI or other). Follow the path below for the configuration step.


SAP Customizing Implementation Guide
-->Materials Management
    -->Purchasing
        -->Conditions
            -->Define Price Determination Process
                -->Define Calculation Schema

Select the procedure that is relevant for you and double click on 'Control Data' in the side. In the subsequent screen, you will find a table grid, find the condition type you are interested and set the column 'P' (Print ID for condition lines) to 'X' (Condition line is printed at item level). That will take care of it.

0 Kudos

But please remember that this is global for all print media(print, email, EDI etc). So even a printed quotation will show the condition items after setting this. But if you pick up the right procedure, you should be able to at least restrict it to only quotations.