USEREXIT_FILL_VBRK_VBRP
Hi all,
I'm try to fil the user field VBRP-ISHPRICE1 using the USEREXIT_FILL_VBRK_VBRP.
The information comes from TKOMP-ISHUSERPRICE1, i mean, the user exit code is very simple:
CHECK NOT vbrk-ishkostr IS INITIAL.
PERFORM call_badi_pricing_fields(sapln60a)
USING vbrk-ishkostr
vbap-vbeln
vbrp-ishbegdt
vbrk-vbtyp
CHANGING tkomk
tkomp.
vbrp-ISHUSERPRICE1 = tkomp-ISHUSERPRICE1.
ENDIF.
But i found a strange behavior, the sequential number is VBRP always is 1 more than sequential number in TKOMP, then the user-exit works, but the information is saved in the following service.
any ideas why is happening this??
thanks in advanced.
P.D. maybe i have to post in SD forum, what do you think??
EDIT: the same behavior with/without the badi call. the badi implementation doesn't have code for now, because we fill the KOMP-ISHUSERPRICE in a pricing routine.
Edited by: felix gomez on May 19, 2010 1:49 PM
Hi Felix
I used that badi several times ... Please, make shure to follow the instructions that are described in SPRO:
SAP Healthcare - Industry-Specific Components for Hospitals -> Patient Accounting -> Billing -> Pricing (Using Conditions) ->New Fields for Pricing.
with best regards
Matías
Similar Messages
-
How to check if a user fills a header text in billing invoice
Hi everybody and thanks in advance.
My consultant wants to oblige all users to fill a header text when they create the billing invoice (vf01).
I was looking for several user exits when I can manage this requisite.
My problem is that when the user creates the invoice and push save button, I try to look for in the table STXH if the user created the header text. But I have not found anything, because the invoice has not created yet.
Only when the billing invoice has saved, the header text is stored in the table STXH.
I has been trying to find a structure wich contains the header data like xvbrk contains the data about type of invoice, etc.
I have studied this user exits:
userexit_number_range (module pool saplv60A, program rv60afzz)
userexit_account_prep_komkcv (same module)
userexit_account_prep_kompcv (same module)
userexit_fill_vbrk_vbrp (same module)
v60A0001 (Customer functions in the billing document).
My question is: In which structure is the header text of billing invoice manage before push the save button?
If I knew where it is, I could manage the data and check if the user filled the header text.
Thank you very much, and sorry for my pour English.David,
Place this code into USEREXIT_NUMBER_RANGE:
DATA: CATALOG LIKE TCATALOG OCCURS 0 WITH HEADER LINE,
MEMORY_ID(30).
data: c_MEMORY_ID(30) VALUE 'SAPLSTXD'.
DATA l_head type THEAD.
DATA wa_head type THEAD.
data: l_lines type table of TLine.
data: l_line type TLine.
DATA l_CATALOG type TCATALOG.
IMPORT CATALOG FROM MEMORY ID 'SAPLSTXD'.
loop at catalog into l_catalog.
if l_catalog-IS_REFTEXT is initial
and l_catalog-keep is initial.
concatenate c_memory_id l_catalog-id into memory_id.
import thead to l_head
tline to l_lines
from memory id memory_id.
loop at l_lines into l_line.
message i000(zz) with l_line-TDLINE.
endloop.
endif.
endloop.
It will expose the text entered into the text ids in a message box (for now). You will want to replace the MESSAGE statement with your own logic.
You may also need to change the message numver/class from ZZ - as seen here "message i000(zz) with l_line-TDLINE." with an appropriate message on your system.
DON'T forget those points. -
VBRP-VKGRP field needs to be changed
Hi all,
I've a requirement. Sales group (VBRP-VKGRP) needs to be changed in Billing document. Is that possible?
Please throw some light on it.
Thanks,Hi,
It is not possible to change or enter the field while creating an invoice. If you want to enter it in the invoice, you can enable this by means of an User exit. Using the user exit, you can programatically provide the value during invoice creation.
You can try the user exit USEREXIT_FILL_VBRK_VBRP in the program RV60AFZC
Hope this helps -
How to prevent creation of billing docs for Zero Quantities
Hello everyone,
Could someone please help me with this.
We have some invoices created with 'zero' quantities. We need to stop prining invoices for the invoices with zero quantities. Can we stop creating invoice for zero quantities. if yes , please let me know how. Any help is very much appreciated.
many thanks
Edited by: Simsasha on Jan 30, 2009 2:31 AMDear Simsasha,
Could you please breif whether:
1. Its Order-related-Billing, OR
2. Delivery-Related Billing
If, Its Order-related-Billing, You need to work-around Copy-Control Setting in VTFA; and if,
Its Delivery Related-Billing, You need to work-around Copy Control settings in VTFL.
You need to write Code to check Quantity = 0, and attach the same within Field: Data VBRK/VBRP; to check and avoid Invoice creation, if Invoice-item has billed quantity as 0.
You may work with Program RV60AFZC USEREXIT_FILL_VBRK_VBRP
Best Regards,
Amit
Note: You may take help from the discussion from following thread:
[Billing with Zero Quantity, not allowed|Re: Billing for zero quantity is being allowed]
I hope, this would definitely help you, some extent. -
How to block certain Distribution Channel / Billing type combination?
Hello,
Is there a possibility to prevent creating biling document if it contains certain combination of Distribution channel in document header and billing type (i.e. F2 / 20)?. Some user exit?
Thanx.Few options are there
1) Try with billing user exit USEREXIT_FILL_VBRK_VBRP (Module pool SAPLV60A, program RV60AFZC)
2) Have a separate billing type for the distribution channel which you dont want to generate billing where you can have a different doc pricing procedure. Dont assign this document pricing procedure in OVKK
3) If you go for separate billing type, you can also avoid maintaining copy control in VTFL
4) Apart from all the above options, you can also add this logic in your existing routine such that if the combination of particular distribution channel and F2 comes, it should not be generated / saved.
thanks
G. Lakshmipathi -
User-exit that split at item level according to bill of entry(BOE)
HI,
need to write the logic for splitting invoices at item level according to BOE.
Customized new table:
Info for the customized table:
Table Name: ZIN_BONDINV
Field Name Data Element Type Length Short Text
MANDT MANDT CLNT 03 Client
VBELN VBELN_VF CHAR 10 Billing Document
EXNUM J_1IEXCNUM CHAR 10 BOE or Excise Invoice #
EXYEAR J_1IEXYEAR NUMC 04 Excise Year
ZEILE J_1IZEILE1 NUMC 04 Item no - GR at depot
ZVBELN VBELN_VL CHAR 10 Delivery Number
Z POSNR POSNR_VL CHAR 06 Delivery item
ZWERKS WERKS_D CHAR 04 Plant
This table to be used for storing the invoice created using delivery document along with other information extracted during billing document creation.
Logic for populating the table:
User Exit: RV60AFZC
Form: USEREXIT_FILL_VBRK_VBRP
This user exit should be used to update records in the customized table for the data with which billing document is created. The data should be populated as follows:
VBELN = VBRK-VBELN
EXNUM = J_1IRG23D-EXNUM*
EXYEAR = J_1IRG23D-EXYEAR*
ZEILE = J_1IRG23D-ZEILE*
ZVBELN = VBRP-VGBEL
ZPOSNR = VBRP-VGPOS
ZWERKS = VBRP-WERKS
*The above data is read during splitting the billing document based on BOE (copy control routine 602) and should be used from there.USER-EXIT NAME IS RV60AFZZ
-
User Exit/BADI/Enhancement Point in VF01 before new document no assignment
Hi Expert,
I am looking for a user exit/BADI/Enhancement point which will trigger in VF01 before the new document no (Billing document no assign).
I need to cross check few things in Billing via VF01 at billing document save and give error message accordingly. The problem is if new number assign and there is error due to my code then when user save the document next he get a new no. its mean a no skip.
Example: The invoice no is 1000. User start creating a billing document with Vf01 and he get an error message due to my code at exit , at this point of time the next number assign to billing which is 1001 but document not save due to my error message. Now after applying correction user save data and billing document created with no 1002. So there is no skip.
I tried BADI BADI_SD_ACCOUNTING but this will trigger after no assignment. Can someone provide me a user exit/BADI/Enhancement point in VF01 which trigger before no range assignment and contain at least Billing header data to use in my code?
Regards
Swati
Edited by: Swati Namdev on Nov 16, 2010 9:55 PMHI Brad and team,
BRED is right. I check few user exit normally all of us have that list or easily available on net.
BRED: my question is: I need to check the billing date VBRK-FKDAT of document should not be less than the sales order plan billing date VBAP-Oldate.
If this check fail then won't allow the user to create billing document. The problem is I used one user exit SDVFX001 already define previously that's work fine but issue is that user exit trigger after the billing no assignment. That's why when user get that error message he correct the document and create billing this time he get a new number which is skip of one no.
That why I need a User Exit/BADI/Enhancement Point which trigger at save but before document no assignment.
Please update more about your comment "Why not use a header level copy requirement routine to perform the checks and log the messages? This is the standard process." .
Suggest user exit USEREXIT_FILL_VBRK_VBRP trigger before save. I need at save the reason is VBRK-FKDAT this can be change.
Feel free to contact me back if you need more clarification.
Regards
Swati
Edited by: Swati Namdev on Nov 17, 2010 6:22 PM
Edited by: Swati Namdev on Nov 17, 2010 6:25 PM
Edited by: Swati Namdev on Nov 17, 2010 6:32 PM
Edited by: Swati Namdev on Nov 17, 2010 6:47 PM -
Restriction for release of billing document to accounting
Hi All,
Need you inputs for meeting the below requirement.
There is a requirement to control the release of billing document of a certain billing type to accounting based on certain users.
The posting block has already been ticked at the definition of the billing type so that the release to accounting does not happen automatically. The release to accounting then will be done manually by users through tcode VF02. Here the requirement is that only certain users need to have the authorization to release the billing document to accounting through VF02 i.e not all users who have access to VF02 will be able to do this activity of releasing to accounting. These users can however release billing documents of other types to accounting.
Is there any user exit wherein we can place an authorisation object for checking the user role?
Note: When relase of billing documents is done via VF02 the tcode VFX3 get called in background.
Regards,
RajkumarHi,
Try these ywo approaches- restrict the authorisation to VFX3 using basis roles. And try to fiddle with this field in vbrk using userexits- RFBSK. Try this exit
USEREXIT_FILL_VBRK_VBRP (Module pool SAPLV60A, program RV60AFZC)
Regards,
Saurabh -
Block cancellation/creation of billing document on CLOSED posting period
Hi Experts,
Currently, user is allowed to cancel/create backdated billing document where period already closed, but it does not release to accounting automatically, due to the period has been closed.
When account user found out that the accounting document is missing for the billing document, they have to re-open the period and manual release it to accounting, in order to generate the accounting document.
Therefore, we need the billing document to be blocked for cancellation/creation on CLOSED posting period.
Is there any settings in stardard SAP to block cancellation/creation of billing document on CLOSED posting period?
would appreciate your inputs.
Thanks and Regards,
N.C.ReddyHi ,
We have blocked cancellation/ creation of billing document through below user exit. Below is the progran code also.
***INCLUDE RV60AFZC.
FORM USEREXIT_NUMBER_RANGE_INV_DATE USING US_RANGE_INTERN.
Example: Number range from TVFK like in standard
US_RANGE_INTERN = TVFK-NUMKI.
*{ INSERT KPDK904773 1
*Block creation or cancellation of billing doc in closed period
DATA : gv_gjahr TYPE bkpf-gjahr,
gv_monat TYPE bkpf-monat,
gv_poper TYPE t009b-poper,
gv_bukrs TYPE t001-bukrs,
lv_gjahr TYPE t001b-frye1,
lv_monat TYPE t001b-frpe1,
gv_oper TYPE t001b-frpe1.
CLEAR : gv_gjahr, gv_monat, gv_poper, gv_bukrs.
gv_bukrs = vbrk-bukrs.
IF NOT likp-wadat_ist IS INITIAL.
*- First determine the Period of the Actual GI date.
CALL FUNCTION 'FI_PERIOD_DETERMINE'
EXPORTING
i_budat = likp-wadat_ist
i_bukrs = gv_bukrs
IMPORTING
E_GJAHR = gv_gjahr
E_MONAT = gv_monat
E_POPER = gv_poper
EXCEPTIONS
FISCAL_YEAR = 1
PERIOD = 2
PERIOD_VERSION = 3
POSTING_PERIOD = 4
SPECIAL_PERIOD = 5
VERSION = 6
POSTING_DATE = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
CLEAR : lv_gjahr, lv_monat.
lv_gjahr = gv_gjahr.
lv_monat = gv_monat.
*- Once period is determine check whether Period is open or not for 'D' - Customer Account
CALL FUNCTION 'FI_PERIOD_CHECK'
EXPORTING
I_BUKRS = gv_bukrs
i_gjahr = lv_gjahr
i_koart = 'D'
i_monat = lv_monat
IMPORTING
E_OPER = gv_oper
EXCEPTIONS
ERROR_PERIOD = 1
ERROR_PERIOD_ACC = 2
INVALID_INPUT = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
*- Once period is determine check whether Period is open or not for 'S' - All G/L Accounts
CALL FUNCTION 'FI_PERIOD_CHECK'
EXPORTING
I_BUKRS = gv_bukrs
i_gjahr = lv_gjahr
i_koart = 'S'
i_monat = lv_monat
IMPORTING
E_OPER = gv_oper
EXCEPTIONS
ERROR_PERIOD = 1
ERROR_PERIOD_ACC = 2
INVALID_INPUT = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
*- Check Billing Date period is closed or not
IF kom-fkdat is not initial.
clear : gv_gjahr, gv_monat, gv_poper.
*- First determine the Period of the Actual GI date.
CALL FUNCTION 'FI_PERIOD_DETERMINE'
EXPORTING
i_budat = kom-fkdat
i_bukrs = gv_bukrs
IMPORTING
E_GJAHR = gv_gjahr
E_MONAT = gv_monat
E_POPER = gv_poper
EXCEPTIONS
FISCAL_YEAR = 1
PERIOD = 2
PERIOD_VERSION = 3
POSTING_PERIOD = 4
SPECIAL_PERIOD = 5
VERSION = 6
POSTING_DATE = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
CLEAR : lv_gjahr, lv_monat.
lv_gjahr = gv_gjahr.
lv_monat = gv_monat.
*- Once period is determine check whether Period is open or not for 'D' - Customer Account
CALL FUNCTION 'FI_PERIOD_CHECK'
EXPORTING
I_BUKRS = gv_bukrs
i_gjahr = lv_gjahr
i_koart = 'D'
i_monat = lv_monat
IMPORTING
E_OPER = gv_oper
EXCEPTIONS
ERROR_PERIOD = 1
ERROR_PERIOD_ACC = 2
INVALID_INPUT = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
*- Once period is determine check whether Period is open or not for 'S' - All G/L Accounts
CALL FUNCTION 'FI_PERIOD_CHECK'
EXPORTING
I_BUKRS = gv_bukrs
i_gjahr = lv_gjahr
i_koart = 'S'
i_monat = lv_monat
IMPORTING
E_OPER = gv_oper
EXCEPTIONS
ERROR_PERIOD = 1
ERROR_PERIOD_ACC = 2
INVALID_INPUT = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
IF kom-fkdat4(2) <> likp-wadat_ist4(2).
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
*} INSERT
ENDFORM.
FORM USEREXIT_FILL_VBRK_VBRP *
This userexit can be used to fill fields in VBRK and VBRP *
Be aware, that at this time the work areas KUAGV KURGV *
KUWEV and KUREV are not filled. *
This form is called from FORM VBRK_VBRP_FUELLEN. *
FORM USEREXIT_FILL_VBRK_VBRP.
Example: change Tax country
VBRK-LANDTX = T001-LAND1.
ENDFORM.
*eject -
Restricting Creation of invoice
Hi friends
Creation of SO is required without PO number to continue with other activities like production, delivery. But how can we restrict the user from creation of invoice if PO number is not maintained in Sales Order PO field.
Please help me in this regard
Regards
VenkatFirst of all, there is no incompletion log for billing. So what you can do is that you can add this logic in your existing routine assigned in VTFL. Alternatively, you can try with billing exit USEREXIT_FILL_VBRK_VBRP (Module pool SAPLV60A, program RV60AFZC)
thanks
G. Lakshmipathi -
How to set Exch.rate-acct. field on Billing tab of billing document item
In R/3 4.7, we have billing documents with different values for Exch. Rate on each line item. We want the values to appear also in the Exch.rate-acct. field so the values will apply to the line items on the FI document. They are greyed out for us.
Does anyone know what to set to allow this field to be entered?Lisa,
Not sure about 4.7, we used userexit_fill_vbrk_vbrp (rv60afzc) back on 4.5 to populate Exch.rate-acct field with the rate which was different from the rate used for invoice. I think you may put some logic into this userexit to populate the field based on your rules. -
How to update the field 'VBRK-ZUONR' of Billing Document Header(VF03)
Hi Experts.
I got a request to update the field 'VBRK-ZUONR' of Billing Document Header(T-code:VF03).
At first i thought it might be a BADI or User-Exit case and looked up in Standard Program but found nothing.
Thus i doubted if it was a configuration problem.
I tryed to configure through transaction code "VTFA" "VTFL" "VTFF" and met another failure.
Now i'm totally lost and hope for your advice,any information would be appreciated.
The Billing Document is automatically generated from the posting of Outbound Delivery.
Regards.
Panda.Hi friends.
I've found where point is.
The include program 'RV60AFZC' contains a form named 'USEREXIT_FILL_VBRK_VBRP',
in which the field 'VBRP-ZUONR' could be set through coding.
In our system the codes had been changed once,which led to the misalignment that confused me yesterday.
On the other hand,undoubtedly VTFL is available to configure the value of 'VBRP-ZUONR'.
For more information plz refer to
http://help.sap.com/saphelp_46c/helpdata/en/18/f62c7dd435d1118b3f0060b03ca329/content.htm
Thanks again to all of you.
Best Regards
Panda. -
Multiple Deliverys in to Single Billing document for same part number
Hi all,
We want to combine multiple delivery items into one invoice line item for same material code,
Scenario is like this,
Sales order getting created with BOM ( Header items and more then 50 Component items with 30 to 40 quantity for each line items )
Based on availability we will create a delivery document for header and component items -fox example
sales order - Header - material - A with 1 quantity and component is Material is B with 40 quantity, based on availability we will create delivery document, let say 20 quantity and rest 20 quantity we will create another delivery docuemnt,
while creating billing system creating with reference to two delivery docuemnt its creating two line items,
My Client requirement is if the material code is same, in billing document they need only one line item with all quantity, let say .. above example is for 40 quantity in to single line items in billing document.
This can be possible in standard SAP,
Can any one guide us or Which billing user exit would be suitable?
Regards
NishadHi,
For the first part i think you can explore the "Delivery Group" option available in the item category setting.For the second requirement try to explore USEREXIT_FILL_VBRK_VBRP ( Program RV60AFZC)
hope it helps
Regards,
Shantanu -
Business Area is not flowing to Billing Doc Line item
Hi,
Since recently we have observed that in some billing document creation, the business area in sales order line item is not flowing to the billing document line item.
VBRP-GSBER remains blank due to which we face problem in J1IIN txn.
This is not happening in all the cases. There are very few instances where business area is becoming blank in billing document line item.
But when the same billing document is reversed and new billing document is created, the business area flows properly to billing document line item (in VBRP).
Can anybody suggest why such erratic behaviour? And how to resolve the issue?
Thanks and Regards
RatnaDear Shiva Ram and Srinath,
Thanks for your reply
I had checked the settings in SPRO. These are OK. The sales order line item is deriving business area properly. But in some cases (not in all the cases) the business area is not flowing to Billing Line Item during billing document creation. It is happening in production server and not in development server.
I intend to use user exit userexit_fill_vbrk_vbrp to fill the VBRP-GSBER col with VBAK-GSBER if VBRP-GSBER is blank during saving the sales bill thro VF01..
Pl. suggest.
Regards
Ratna -
Billing document - Baseline date change status
Hi folks,
I have the following issue with the baseline date for the billing documents.
Billing date proposed by the systems based on the goods issue is 30.01.2010 while the date of creation of document is 31.01.2010. In FB03 transaction baseline date status is showing as changed from 30.01.2010 to 31.01.2010. Following is the setting done: In OBB8 for the said payment terms the baseline date shown is the "posting date' and in VTFL item level copy control
it is defined as "Data VBRK/VBRP 007 Inv.Split (Rec/Div)".
Why is the baseline date getting changed by the way User is entering the bill of lading in the outbound delivery >Header>Shipment (on 31.01.2010)..not sure if this is in any way contributing to the baseline date change...Appreciate your reply.
cheers
JosephBaseline date is generally governed by config in OBB8 but we can influence it by writing code in USEREXIT_FILL_VBRK_VBRP. This will obviously affect baseline date in billing docs. The same should get copied into the accounting document. Now the catch is if the accounting document is changed (e.g. Payment terms) then system will populate baseline date as per the config.
So may be you should check if there is anything in the userexit and whether accounting document was changed.
Maybe you are looking for
-
BT are thr worst company I have ever dealt with.
Had a new telephone line and Infinity 2 installed on the 21st of May. I have had nothing but problems with the broadband speed and stability. When my new BT phone the BT6500 arrived the problems increased to the phone line and the phone itself. Five
-
Change background color of Stage with AS
We I have a preloader that plays behind my transparent movie clip and I want to change the stage to black when I go to Full Screen. From what I have found most people use a black box but that won't scale in FS. So does anybody have another solution f
-
Mail Udate? Import Messages? Mail is all messed up!
Today I logged into my Mac and tried to read my mail like I always do at 8am, and I was prompted by a screen saying similar to "Welcome to Mac Mail in Tiger, Mail needs to import your messages before you may use mail. Click Okay to continue" Not like
-
View APP purchase history on IPAD (not Mac)
I see this question asked and the answer always seems to be to open iTunes and click your account, etc. this assumes I have a Mac computer, I don't 1. I do not have a Mac 2. Opening iTunes on my ipad IOS 6 there is NO account link 3. Purchase his
-
How to fetch TimeZone of remote machine ?
Hi all, how could i get the time zone of a remote machine ? what i want is, just by providing the IP i want to retrieve the time zone. All reply will be appriciated. Thanks [email protected]