cancel
Showing results for 
Search instead for 
Did you mean: 

how to exclude free items in invoices sending through EDI'S

Former Member
0 Kudos

Hi Gurus,

Am new to this forum,

Can anyone tell me how can i exclude the free items in invoices ie TANN items for particular customers when we send invoices through EDIS.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186385
Active Contributor
0 Kudos

Hi,

Check the Function module for Invoice Idocs

IDOC_OUTPUT_INVOIC

you have to write a code in it

regards,

santosh

Former Member
0 Kudos

Hi Sir,

Thank you for your reply.Can you help me in analyzing this a little more.where can i check the function module for i docs??? can i check in se16???

An one more doubt i have, even making the item category not relevant for billing i.e TANN...will solve this problem right sir?? if its not relevant for billing then it wont come in the invoice..am i right sir.

Regards,

Kavitha K

former_member186385
Active Contributor
0 Kudos

Hi,

As per the standard TANN is set to delivery related Billing

if you want to set this for not billing relavant, you can set Blank in BILLING RELEVANCE

and necessary copy controls also to be done

for your Function module question, you can check Function module in SE37

regards,

santosh

Former Member
0 Kudos

Hi Sir,

Can you kindly tell me what exactly code i need to write in the function module as you have mentioned above for the exclusion of TANN ITEMS??

Regards,

Kavitha

former_member186385
Active Contributor
0 Kudos

Hi,

you can tell to your ABAPer to ignore this item category TANN while populating the values to corresponding segment

If i recollect correctly i think the segment for Billing items is E1EDP19

ensure to check this with your developer to avoid complexity

regards,

santosh

Answers (2)

Answers (2)

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

You have available the enhancement LVEDF001. Check SAP Note 562193 - EDI: Filling segments in customer function '002', designed for adding new segments, but as note tells, it's possible modify existing segments.

I hope this helps you

Regards

Eduardo

former_member182378
Active Contributor
0 Kudos

kavitha,

From my understanding this is a requirement related to Output determination.

Your client wants to sent invoices through EDI.

Thus I do not understand santosh's suggestion w.r.t. Idocs!

If it is about sending invoice (information) to particular customers without information about Free goods (item category TANN), then you have to take the help of an ABAPer and write the relevant piece of code in the Output program.

The program governs the extraction of data from SAP (invoice information) and then sends it to the form / layout.

The code in the program would hinder the information of Free goods to go to the form/ layout (i.e. EDI output).

Former Member
0 Kudos

Hi Sir,

Thank you for your reply. It is we need to remove the free of charge line items in the EDI invoices.So You mean this requirement is with the output determination and not with the coding?

Kavitha

former_member182378
Active Contributor
0 Kudos

Kavitha,

First question is does your client want to send the invoice (information) to specific customers via EDI?

In other words, is the invoice created in SAP and that invoice information has to be sent to some specific customers via EDI?

Former Member
0 Kudos

Hi Sir,

Its the created invoice need to be sent to the customer via EDI.

But then what difference it makes about sending the invoice info or sending the already created invoice info.

Regards,

Kavitha

eduardo_hinojosa
Active Contributor
0 Kudos

Hi Kavitha,

I believe I understand you now. Rule it with copy rules and set a subroutine VOFM for avoiding system will copy items TANN, because you don't want items TANN will be created in table VBRP, am I right?

Regards

Eduardo

former_member182378
Active Contributor
0 Kudos

kavitha,

Sending information to customers (information like order confirmation, invoice, delivery etc.) is covered in SAP Output determination functionality.

Please go through the theory of Output determination.

This shall give you a good idea.

If you would like to send an invoice information without any change via EDI, that can be done via Ouput determination with Standard SAP. (no coding required).

But you want to sent invoice information without Free goods information - For this you need the help of an ABAPer. He has to do some coding in the Output program.

From my understanding, Output determination is the way forward.

And not Idoc etc.

former_member182378
Active Contributor
0 Kudos

Eduardo,

From my understanding, the billing document should have the Free goods information also.

Only the invoice information which is sent to the customer via EDI should not have the Free goods information.

Therefore making the changes you have suggested in Copy control would not be the solution to this requirement.

kavitha,

Please comment on my understanding. (i.e. information in the billing document and the information that is to be sent to the customer via EDI)

Former Member
0 Kudos

Hi Sir,

Whatever you have said is correct, billing document should have free goods information, but the info which is sent to the custome via EDI should not have free goods info.

Former Member
0 Kudos

Hi Sir,

So now the coding should be done in the output determination.what need to be added in the program, should we have to do any changes in the function module for this.

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

So research the note suggested about the enhancement LVEDF001. If it's not possible delete this segments, use the FM IDOC_OUTPUT_INVOIC as a template and copy in your own funcion module (ie: Z_IDOC_OUTPUT_INVOIC, write the proper coding and do the needed customizing steps in ALE).

Regards

Eduardo

former_member182378
Active Contributor
0 Kudos

kavitha,

No changes are needed in the functional module.

In the ouput program, you have to give a logic that would instruct the program to fetch all information of the billing document except the information related to Free goods (with item category TANN).

Discuss your requirement from a functional perspective with your ABAPer and he/she shall be able to guide you.

Most important is to read the theory of Output determination

e.g.

http://wiki.sdn.sap.com/wiki/display/ERPLO/output+determination+using+condition+technique

Former Member
0 Kudos

Hi sir,

Thank you for the document.And i completely understand the answer now.But still am not getting the logic which i need to create.I mean how do i write logic for it..And one more point is it is customer specific.I.e oly for a set of customers we should not display the TANN items.So can you kindly help me with this.

Former Member
0 Kudos

Hi Sir,

You mean i need to create a report according to the requirement??

Kavitha

former_member182378
Active Contributor
0 Kudos

kavitha,

You as a functional consultant shall write the Functional specifications (in other words, how should the program work).

Based on your functional specifications, the technical consultant (an ABAPer) shall write the code / logic in the output program (which is related to your output condition type, check transaction code NACE).

In your functional specification you have to mentioned that

If VBRK-KUNNR (Sold to customer) is one of the select customers (e.g. 5001, 5002), then check if VBRP-PSTYV = TANN,

If yes then do not populate the values VBRP-FKIMG, VBRP-NETWR etc.

if VBRK-KUNNR (Sold to customer) is not one of the select customers, then create output; extracting all the information from the billing document.

could you please help kavitha with the (initial version of) the code.

Above, I have given some suggestions.

Thank you, in advance!

Former Member
0 Kudos

Hi Sir,

Thank you so much for this reply.I really dint have any idea about writing the logic.Its really a great help for me.I think now i will be able to solve this/  moazzam sir kindly help me with the initial version of the code.

Thank you,

Kavitha

moazzam_ali
Active Contributor
0 Kudos

Hi

TW has suggested you best solution and he has explained in very good manners. Now I will add one more thing in his suggestion that you can create a customer group for those customers to whome you dont want to send information. You can use KNVV-KDGRP or KNVV-KONDA fields. There are also many others and you can create group in any one them.

Now would you please tell me are you ABAPER or do you have any ABAPER? TW has explained the logic and now you have to convert it into technical language and I am also not a technical ABAPER but if you don't have ABAPER then I can discuss this with my ABAPER and we can give you some coding hints but again you have to write a whole program so it is better that you take ABAPER's help.

Thank$

Former Member
0 Kudos

Hi Sir,

Am a SD consultant.Yes we have an abaper ,i will take their help.And one more thing i wante to ask cant i use sales organization VBRK-VKORG, Because we need to filter out customers of one place.

So can i use this?

Regards,

Kavitha K

moazzam_ali
Active Contributor
0 Kudos

Hi

Yes you can use two or more fields for filetring customers. You logic will be like if KNVV-VKORG = XXXX and KNVV-KONDA=XXXXX then your program will execute or else nothing. ABAPER can understand this in better way.

This is an interesting requirement. Please let us know and update forum with your findings.

Thank$

Former Member
0 Kudos

Hi Sir,

I discussed the same with my mentor and i told her about the logic, but then she asked me to check in the segment related to it as we are sending this data through idocs she asked me to check the segment data.And E1EDP01 is the segment for item general data.

jpfriends079
Active Contributor
0 Kudos

KSK k

Solution is already suggested by Santosh & Eduardo in their respective post. Please refer their post.

You need to add logic in FM module to restrict execution of segment E1EDP01 in the IDoc. To restrict the same (logic already mention by TW)

if item category relevant for free of goods

or/add

if item level net price = 0

FYI. Generally, you don't use/develop custom develop program for EDI, instead of program RSNASTED & FORM routine EDI_PROCESSING.

Thanks, JP

former_member182378
Active Contributor
0 Kudos

Moazzam,

Thank you for your post!

In order to get more clarify, please comment my below point:

Now I will add one more thing in his suggestion that you can create a customer group for those customers to whome you dont want to send information. You can use KNVV-KDGRP or KNVV-KONDA fields. There are also many others and you can create group in any one them.

Business requirement:

For some customers, some specific action should be done (i.e. do not send billing information related to Free goods).

Now you suggest using Sales group, from table KNVV.

This might not be the "best" way!

If the restriction (in the business requirement) at a Payer or Sold to party customer level - in other words, across all sales areas; then why go to Customer Sales area data table, in order to incorporate the logic for restriction?

Better for the logic would be to check with Billing information itself (e.g. VBRK)

Side comment - I like the idea of grouping the customers which have this special (restriction) requirement.

Former Member
0 Kudos

Adding To JP Respose -

These IDOCs are further transmitted to Individual customers via 3rd party tools which map our IDOC's Segments to Customer legacy system.Those Maps are customer specific.and if you want to further restrict specific customers within EDI customers i.e some EDI customers require free Delivery item and some not then i would prefer to bother 3rd party vendor to incorporate logic at their end to ignore lines having value 0 (E1EDP05 -BETRG =0) for specific customer.For them,its only two line of code and  1 hr of testing effort but on our end we have to build the whole wheel.

Regards

Amit