cancel
Showing results for 
Search instead for 
Did you mean: 

User- EXit help urgent!

Former Member
0 Kudos

Hi Guru's

I need your help with a User-Exit.

The problem that were having right now is with my TAS items (third Party items) since my client does not want to change the item category billing relevance to F. it's set at G right now to invoice through GR. What has happened is the Sales Orders are still showing as Being Processed even after shipping has been done, Invoicing and we have received payment from customer.

I need a user exit that can set this orders as complete once invoicing has been done and for this doc not to show up in VA05 as open orders- any one has any ideas of user- exits that can help

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Is there a reason for using G and not F, which is for TAS item category provided in SAP system.

If you put F is there any business process disturbance. Check with your BA's. SAP had given the following:

F: Order-related billing doc. - status according to invoice quantity

Relevant for order-related billing documents based on the invoice receipt quantity (third-party business transaction). The system transfers the order into the billing due list only after the vendor invoice has been received and processed in the purchasing department. After the receipt of each invoice, a customer invoice is created for the quantity that appears on the vendor invoice. The order has status "Billed" until the next vendor invoice is received.

Item category TAS (Third party item) is set up with billing relevance "F" in the standard system.

This process can also be related to the quantity of goods receipt.

You can make the control setting as to whether the invoice receipt quantity or the goods receipt quantity should be relevant for billing in the copy control for billing on the item level in the billing quantity field. (In Customizing, choose Sales and Distribution -> Billing -> Billing documents -> Maintain Copying Control for Billing Documents -> Copying Control: Delivery to Billing Document -> Item, then select an item category.)

G: Order-related billing of the delivery quantity

The order is relevant for billing. More specifically, the cumulated delivery quantity that was already delivered is relevant for billing. You can use this category to bill for multiple partial deliveries at once.

Former Member
0 Kudos

Hi Sudval,

The problem is not with billing......the Client decided to invoice from GR and not from Vendor invoice- due to delays from vendors taking to long to send there invoices and the turn around time for them to invoice customer since were talking abt big dollar amts.

I'm aware of all the Standard SAP config in VOV7 for item category to be set at F. and also VTFA copy control to also be set as F per standard SAP. My client has declined to follow normal SAP process. that's why i need a user exit that can close this orders that are showing as being processed even after delivery, Invoicing and monies have being received from customer.

Do you know of any user exit i can use to update this line item (TAS) once invoiced it can automatically trigger the status of the order as complete?

former_member204513
Active Contributor
0 Kudos

Dear Joi,

Try with these User Exits,

Program MV45AFZB

1.USEREXIT_CHECK_VBAP

Program RV45PFZA

2.USEREXIT_SET_STATUS_VBUP

I hope it will help you

Regards,

Murali.

Former Member
0 Kudos

Hi

Can someone help me with writting the functional specs- what tables, fields should i be looking at and what will trigger the sales orders to show complete once user exit is run?

Not sure how to go about this-

former_member204513
Active Contributor
0 Kudos

Dear Joi,

The fallowing tables are related to the sales document

VBAK -


(SALES DOC HEADER)

VBAP -


(SALES DOC ITEM)

VBFA -


(SALES DOC FLOW)

VBUK -


(SALES DOC HEAD. STATUS)

VBUP -


(SALES DOC ITEM STATUS)

-->In the functional spec you mentioned the present process then explain the requirement

-->Give the detailes about the GAP (difference between present and requirement)

-->Mentioned what type of devlopment here you can put as enhancement.

Give the User exit

-->Give the related tables, for you I think VBUP -


(SALES DOC ITEM STATUS) or VBUK -


(SALES DOC HEAD. STATUS tables are enough.

I hope it will help you

Regards,

Murali.

Edited by: Murali Mohan.Tallapaneni on Apr 9, 2008 6:05 AM

Former Member
0 Kudos

Hi Friend,

First you try with this:

01. Go to Item Category>- ZTAS>

> you hav completion rule where you select c and check.

02. If not resoleved then you need to make few changes in copying requirement 28 in copying control requirement which is specially used for third party billing and copy-control rules of order to billing.

I thinnk you don't require any user exit here, try out with this.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Joi,

to find user exits?

Display the program where you are searching for and exit and search for CALL CUSTOMER-EXIT

If you know the Exit name, go to transaction CMOD.

Choose menu Utillities->SAP Enhancements. Enter the exit name and press enter.

You will now come to a screen that shows the function module exits for the exit.

3. Using Project management of SAP Enhancements, we want to create a project to enahance trasnaction VA01 .

- Go to transaction CMOD

- Create a project called ZVA01

- Choose the Enhancement assign radio button and press the Change button

In the first column enter V45A0002 Predefine sold-to party in sales document.

Note that an enhancement can only be used in 1 project. If the enhancement is already in use, and error message will be displayed

Press Save

Press Components. You can now see that enhancement uses user exit EXIT_SAPMV45A_002. Double click on the exit.

Now the function module is displayed. Double click on include ZXVVAU04 in the function module

Insert the following code into the include: E_KUNNR = '2155'.

Activate the include program. Go back to CMOD and activate the project.

Goto transaction VA01 and craete a salesorder.

Note that Sold-to-party now automatically is "2155"

REPORT z_phani_find_userexit NO STANDARD PAGE HEADING.

&----


*& Enter the transaction code that you want to search through in order

*& to find which Standard SAP User Exits exists.

*&

&----


&----


*& Tables

&----


TABLES : tstc, "SAP Transaction Codes

tadir, "Directory of Repository Objects

modsapt, "SAP Enhancements - Short Texts

modact, "Modifications

trdir, "System table TRDIR

tfdir, "Function Module

enlfdir, "Additional Attributes for Function Modules

tstct. "Transaction Code Texts

&----


*& Variables

&----


DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.

DATA : field1(30).

DATA : v_devclass LIKE tadir-devclass.

&----


*& Selection Screen Parameters

&----


SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.

SELECTION-SCREEN SKIP.

PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN END OF BLOCK a01.

&----


*& Start of main program

&----


START-OF-SELECTION.

  • Validate Transaction Code

SELECT SINGLE * FROM tstc

WHERE tcode EQ p_tcode.

  • Find Repository Objects for transaction code

IF sy-subrc EQ 0.

SELECT SINGLE * FROM tadir

WHERE pgmid = 'R3TR'

AND object = 'PROG'

AND obj_name = tstc-pgmna.

MOVE : tadir-devclass TO v_devclass.

IF sy-subrc NE 0.

SELECT SINGLE * FROM trdir

WHERE name = tstc-pgmna.

IF trdir-subc EQ 'F'.

SELECT SINGLE * FROM tfdir

WHERE pname = tstc-pgmna.

SELECT SINGLE * FROM enlfdir

WHERE funcname = tfdir-funcname.

SELECT SINGLE * FROM tadir

WHERE pgmid = 'R3TR'

AND object = 'FUGR'

AND obj_name = enlfdir-area.

MOVE : tadir-devclass TO v_devclass.

ENDIF.

ENDIF.

  • Find SAP Modifactions

SELECT * FROM tadir

INTO TABLE jtab

WHERE pgmid = 'R3TR'

AND object = 'SMOD'

AND devclass = v_devclass.

SELECT SINGLE * FROM tstct

WHERE sprsl EQ sy-langu

AND tcode EQ p_tcode.

FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.

WRITE:/(19) 'Transaction Code - ',

20(20) p_tcode,

45(50) tstct-ttext.

SKIP.

IF NOT jtab[] IS INITIAL.

WRITE:/(95) sy-uline.

FORMAT COLOR COL_HEADING INTENSIFIED ON.

WRITE:/1 sy-vline,

2 'Exit Name',

21 sy-vline ,

22 'Description',

95 sy-vline.

WRITE:/(95) sy-uline.

LOOP AT jtab.

SELECT SINGLE * FROM modsapt

WHERE sprsl = sy-langu AND

name = jtab-obj_name.

FORMAT COLOR COL_NORMAL INTENSIFIED OFF.

WRITE:/1 sy-vline,

2 jtab-obj_name HOTSPOT ON,

21 sy-vline ,

22 modsapt-modtext,

95 sy-vline.

ENDLOOP.

WRITE:/(95) sy-uline.

DESCRIBE TABLE jtab.

SKIP.

FORMAT COLOR COL_TOTAL INTENSIFIED ON.

WRITE:/ 'No of Exits:' , sy-tfill.

ELSE.

FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.

WRITE:/(95) 'No User Exit exists'.

ENDIF.

ELSE.

FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.

WRITE:/(95) 'Transaction Code Does Not Exist'.

ENDIF.

  • Take the user to SMOD for the Exit that was selected.

AT LINE-SELECTION.

GET CURSOR FIELD field1.

CHECK field1(4) EQ 'JTAB'.

SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).

CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.

Thanks&Regards,

Phani,

Points If Helpful.

mandar_shete
Active Participant
0 Kudos

Hi Joi,

Try with RV60AFZZ (USER_EXIT_NUMBER_RANGE).

Thanks,

Mandar

Former Member
0 Kudos

Hi Mandar.....not sure abt this user exit what does the number range have to do with status completiong in sales order?

Lakshmipathi
Active Contributor
0 Kudos

Dear Joi

You can try with User exits in the program MV45AFZZ - USEREXIT_MOVE_FIELD_TO_VBAK.

This user exit is to assign values to new fields at sales document header level.

You can also try with User exits in the program MV45AFZZ -

USEREXIT_SAVE_DOCUMENT_PREPARE

This user exit is to make certain changes or checks immediately before saving a document. It is the last possibility for changing or checking a document before posting.

thanks

G. Lakshmipathi