How to Possibal in Profit Center Mandatory in AR Invoice

Dear Experts,
How to Possibal in Profit Center Mandatory in AR Invoice through SP_Transaction _Notification ??
I have write the code below
<If @object_type = '13' and (@transaction_type = 'A')
begin
IF EXISTS (SELECT DOCENTRY FROM inv1 WHERE (ocrcode is null or ocrcode2 is null or ocrcode3 is null or ocrcode4 is null) AND DOCENTRY= @list_of_cols_val_tab_del)
begin
set @error = 1
set @error_message = 'Please enter a Profit Center before Save'
end
end>
Dixit Patel

Hi Dixit Patel,
Try this,
IF @object_type = '13' AND @transaction_type IN ('A', 'U')
BEGIN
IF EXISTS (SELECT T1.DocEntry FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
WHERE (T1.OcrCode IS NULL OR T1.OcrCode = ' ') AND T0.DocEntry = @list_of_cols_val_tab_del)
BEGIN
Set @error =1
set @error_message = 'Please enter a Profit Center before Save'
SELECT @error , @error_message
END
END
OR
IF @object_type = '13' AND @transaction_type IN ('A', 'U')
BEGIN
IF EXISTS (SELECT T1.DocEntry FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
WHERE (T1.OcrCode IS NULL OR T1.OcrCode2 IS NULL OR T1.OcrCode3 IS NULL OR T1.OcrCode4 IS NULL)
AND T0.DocEntry = @list_of_cols_val_tab_del)
BEGIN
Set @error =1
set @error_message = 'Please enter a Profit Center before Save'
SELECT @error , @error_message
END
END
Regards,
Madhan.

Similar Messages

  • How to make Profit Center Mandatory

    Dear Sir,
    We are using New GL functionality in ECC-6 . During Document Splitting we desire that Profit Center must be mandatory , so that no entry is posted in "Non Assigned Profit Center"
    Kindly guide us as how can we make Profit Center mandatory .
    With Thanks and Rgds
    Sonia

    Hi Sonia,
    May i know for which account assign object u are planning for document splitting, if you want doucment splitting for profit center. In "Define document splitting Characteristics for GL Accounting" step u has to specify Profit Center in the -field, PPRCTR in Partner field and select "Madatory field" check box. I think this will help to a extent.
    By,
    R.K

  • Profit Center Mandatory when creating Cost Center

    Hi,
    How do we make Profit Center Mandatory when creating Cost Center, I remember doing this and cannot recollect as to how i did this in a previous version 4.0b.
    Pls advise how to do the same in ECC 5.0 and higher..
    Thanks,
    Praveen

    Dear Praveen ,
    First u will creat PCA then u will acitvit .
    while creating cost center u have to give profit cnenter accounting .
    ur not enter pca aacoutno then it will give the error message account is activted but profit cneter account not given
    Regards
    Suresh

  • How to make a field profit center mandatory in sales order?

    Dear GURUS,
    Please help in getting answer for following question.
    How to make a field profit center mandatory in sales order?
    With Regards
    Sandeep D.

    Hi,
    There are 2 ways to make profit center mandatory
    1.Transaction Variant
    2.Incompletion procedure
    1.Transaction Variant
    Step 1:Goto Tcode shd0 and input transaction as va01 and give name of transaction variant as ( example. zva01 ) and click on create or F5
    Step 2.Then it takes you to sales order screen.Just click on enter untill you see profit center field.
    Step 3.check the box required against profit center.
    Step 4.click on save ( under a package name or as local object ) and exit
    Step 5.Assign transaction variant to your sales order type through tcode v0v8.
    2.Incompletion Procedure
    You can add the field  table-vbap,field- prctr,status-04,check-warning to your existing incompletion procedure Tcode- ova2 assigned to your order type in tcode vov8  and check the box - incomplete messeges for your order type through tcode vov8.
    If incompletion procedure is not assigned to your order type than you have to create a new incompletion procedure and assign it to order type.

  • How to make the Profit Center Field Mandatory in Cost center Master Data

    Dear All,
    Please let me know how to make the Profit Center Field mandatory in Cost Center Master Data as well as my Internal Order Master Data?
    Thanks in advance!
    Regards,
    Rajeswari Shankar.

    Hi Rajeswari,
    You can modify message number KS096 to "Error" via OBA5. Thus, the users would no be able to save a cost center without entering a profit center. (Depending on your release you can make KS096 modifiable by implementing note 486781.) 
    Concerning the internal orders (transaction KO01), you can run KOT2 and set Profit center field as required entry in "change field selection" section.
    Regards,
    Greta

  • Profit center mandatory field in sales order !

    Hi All !
    How to make profit center mandatory field in sale order can any body let me know...
    Thanks & Rgds
    Naveen

    Hi
    You can either Transaction variant SHD0/User exit
    Refer below<a href="http://www.sap-img.com/sap-sd/supressing-fields-in-sale-order.htm">Fields in Sale Order</a>
    help required: how to makes sales office field mandatory, in inquiry and qu
    Re: supress  some fiels in sales order? user exit?
    Message was edited by:
            SHESAGIRI.G

  • Profit Center mandatory for Cost Center

    Hi,
    How do we make the profit center field in the cost center master data as optional instead of required.
    Thanks,
    Venkat

    If you have activated profit center accounting and if you leave profit center blank in the cost center master, system issues a warning message at the time of saving. You can convert this message to error to make profit center mandatory.
    Regards
    Rakesh Pawaskar

  • How to change the Profit Center in Sales Order

    Hi Gurus,
    Previously they setted the profit center (YB999) in sales order, now i want to change the profit center and need to give the amount into this profit center 100500.
    So, could you guide me how to change the profit center in sales order.
    Thank you for your replies.....
    Thanks & Regards,
    Chandrababu.B
    Edited by: Chandrababu Naidu on May 25, 2011 12:44 PM

    Hi
    If this SO is processed partially - i.e. transactions happened - You cant change it
    You can use ABAP and change it in Debug mode, but not advisable... Better to short close the SO and open a new SO for Balance qty
    br, Ajay M
    Edited by: Ajay Maheshwari on May 25, 2011 5:10 PM

  • Profit Center Mandatory in Cost Center Master

    Hi Expert!
    I would like to know the configuration path to make the option Profit Center Mandatory in cost center master data.
    Thanks
    J

    If you have activated profit center accounting and if you leave profit center blank in the cost center master, system issues a warning message at the time of saving. You can convert this message to error to make profit center mandatory.
    The message number is KS096. It can be configured in transaction code OBA5. Choose application area KS. Insert message 096 and select the desired message type (E for error or W for warning).
    Regards
    Rakesh Pawaskar

  • Profit Center Mandatory in Service Order

    Hi ,
    Is there a customising to make profit center mandatory in service orders (IW31)
    Thanks and Regards,
    Vamsee

    Dear,
    You can do this with transaction variant through SHD0. Record the transaction like IW31 and make the field mandatory.
    Please try and come back.
    Regards,
    R.Brahmankar

  • Gl account is set to profit center mandatory

    Hi All,
    which table can get the data of the GL account is to profit center mandatory ( i.e from tcode OBC4 )

    Hi
    try this out by running T-Code ST05 ( SQL Trace )
    http://help.sap.com/saphelp_erp2005/helpdata/en/17/358df9c9fee2469105731e10756921/frameset.htm
    Follow this way...
    Performing an SQL Trace
    1.Open a new window and choose System ® Utilities ® SQL Trace.
    The Trace Requests screen appears.
    2.Choose Trace On to activate the trace.
    3.Perform a typical database access in the first window (for example, an application transaction or the transaction SE16).
    4.To turn the trace off, choose Trace Off and examine the SQL statement with List Trace.
    5.Position the cursor on one of the PREPARE, OPEN, or REOPEN statements, and choose Explain SQL.
    The system displays detail information. The index used is specified in the line beginning with Index.
    Please reward for the same.
    Message was edited by: Prakhar Saxena

  • How to add the Profit center Group in the PA report KE33.

    Hi Frnds,
    How to add the Profit center Group in the PA report KE33.Iam not able to find PC group in the list to add to the Charateristics already added.

    Hi
    PC group is not available as a Char in COPA..
    if you want to do that, either create a Char Hierarchy in KES3 for the Char Profit Center
    OR
    Create a WW char in KEa5 and write a derivation rule using the method "Enhancement" .. Write ABAP Code in COPA0001 exit
    bt, Ajay M

  • How to find the profit center group for a profit center?

    How to find the profit center group for a profit center?

    Hi,
    try this also
    In order to pass the setid parameter of the FM, you have to concatenate the following things
    Setid + KOKRS (Controlling area) + Profit Center Group into one variable.
    In my example below, I have declared as constants and concatenating to gv_setid.
    gc_01016 is the set id for profit centers
    gc_kokrs is the controlling area
    gp_pprct is the Profit Center group entered in the selection screen.
    You will get KOKRS value from the cepc-kokrs.
    data :   gc_0106(4)   TYPE c VALUE '0106',
               gc_kokrs      LIKE cepc-kokrs VALUE 'ABCD'.
               gv_setid          LIKE sethier-setid,
               gt_set_values_1   LIKE setvalues OCCURS 0 WITH HEADER LINE.
      CONCATENATE gc_0106  gc_kokrs gp_pprct INTO gv_setid.
      CONDENSE gv_setid.
      CALL FUNCTION 'G_SET_TREE_IMPORT'
        EXPORTING
          client                    = sy-mandt
          fieldname                 = 'RPRCTR'
          langu                     = sy-langu
          setid                     = gv_setid
          tabname                   = 'GLPCT'
          no_table_buffering        = 'X'
        TABLES
          set_values                = gt_set_values_1
        EXCEPTIONS
          set_not_found             = 1
          illegal_field_replacement = 2
          illegal_table_replacement = 3
          OTHERS                    = 4.
    By using the above FM you will get the values into gt_set_values1 once sys-subrc value eq 0, it is internal table which consists of all the profit centers for the proft center group.
    Regards,
    Venkatesh

  • How to Check the Profit Center - Sales Group - Sales District for a BP

    Hi,
    How to Check the Profit Center - Sales Group - Sales District for a Business Partner?
    I am not able to identify which Profit center - Sales Group- Sales District was assigned to a Business Partner. Please provide me some inputs to check this.
    thanks
    Yadayya

    Hi
    Pls check these tables for data or prepare a z report with abapers.
    GLPCA u2013 PCA line items
    VBKD u2013 sales district
    TVKGR u2013 Sales group
    BUT000 u2013 Business Partner
    Regards
    Sridhara Rao D

  • Profit center mandatory field in F-58 and F-48

    Hello Experts,
    We need to make profit center is mandatory field in the F-58, F-53 and F-48 while posting payment to vendor.
    Kindly let us know is there any possibility to make required entry for the same.
    Thanks in advance!
    Regards,
    Ratnam.

    Hello Ajay,
    Thanks for the replay, I used field Bank accounts field status group only for making profit center mandatory. Problem got solved now.
    For Reference key mandatory field, I written validation for Required TCodes but Reference key field is not available in the FBCJ kept pending. The same problem is there in MIRO screen also, we are doing enhancement for fetching Ref1, 2, 3 fields the MIRO screen.
    Regards,
    Ratnam

Maybe you are looking for

  • Why did I switch?

    We had two flip phones thru Verizon.  Used it for phone calls only, any text separate charge.  In nov I purchased I phone 5s.  Continued the same phone service with verizon.  I used my wifi thru my land line phone service.  I was getting my land line

  • How to exit from a WebDynpro ABAP application and open another url

    Hi Friends, How to exit from a WebDynpro ABAP application and open another url like (www.yahoo.com) in the same window of the WD4 application on click of a Button? Regards, Xavier

  • Mountain Lion randomly restarts

    Hi! I installed Mountain Lion the first day of its life, and since than I experience a restart every now and then. I did a clean installation of the osx but the problem is still annoying me. Can you please help me? That's the report I get after the r

  • Installing itunes 7.2 error 1325

    My new ipod nano isnt working with my already downloaded itunes 7.0 so i tried to download 7.2. everything worked except that when it was downloading it gave me "Error -1325.IPodService.Resorses is not a valid short file name." What does this mean an

  • Java virtual machine very slow: why?

    Since I have upgraded Tiger to Leopard, the startup of the Java virtual machine is unbelievably slow: for example, just executing java -version for the first time requires almost one minute. This happens only the first time the JVM is started: after