View the actual sales order (VA03, Display Mode) by double clicking on the Document Number of any line item displayed in the report.

   CLASS LCL_HANDLE_EVENTS DEFINITION.
  PUBLIC SECTION.
    METHODS:ON_DOUBLE_CLICK FOR EVENT DOUBLE_CLICK OF CL_SALV_EVENTS_TABLE
    IMPORTING ROW COLUMN.
ENDCLASS. "lcl_handle_events DEFINITION
DATA: EVENT_HANDLER TYPE REF TO LCL_HANDLE_EVENTS.
*       CLASS lcl_handle_events IMPLEMENTATION
CLASS LCL_HANDLE_EVENTS IMPLEMENTATION.
  METHOD ON_DOUBLE_CLICK.
    CASE COLUMN.
      WHEN C_VBELN.
        READ TABLE T_FINAL INTO WA_FINAL INDEX ROW.
        IF SY-SUBRC = 0.
          SET PARAMETER ID: C_AUN FIELD WA_FINAL-VBELN.
          CALL TRANSACTION C_VA03 AND SKIP FIRST SCREEN. "#EC CI_CALLTA
        ENDIF.
    ENDCASE.
  ENDMETHOD. "on_double_click
ENDCLASS. "lcl_handle_events IMPLEMENTATION
Is Something Wrong With The Code?

If you are using ABAP for the report this will fulfill your requirement.
Take a close look at the ZUSEREXIT program.
When you execute it you enter the t-code e.g. VA01.
It will display the enhancements available in VA01.
Now you can click on the user exit name and you will
automatically be transferred to SMOD t-code with the
selected enhancement as a parameter.
You can see in the below code how simple it is to implement this.
You will not call SMOD but VA03 t-code on click.
You can use this code to execute it in SE38 and see how it works.
CODE STARTS BELOW:
report zuserexit no standard page heading.
tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
          tables : tstct.
data : jtab like tadir occurs 0 with header line.
data : field1(30).
data : v_devclass like tadir-devclass.
parameters : p_tcode like tstc-tcode obligatory.
select single * from tstc where tcode eq p_tcode.
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 eq enlfdir-area.
             move : tadir-devclass to v_devclass.
           endif.
        endif.
        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) 'Transakcija - ',
              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 'Naziv exita',
                  21 sy-vline ,
                  22 'Opis exita',
                  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:/ 'Broj exita:' , sy-tfill.
         else.
            format color col_negative intensified on.
            write:/(95) 'Nema user exita za ovu transakciju'.
         endif.
       else.
           format color col_negative intensified on.
           write:/(95) 'Transakcija ne postoji'.
       endif.
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.

Similar Messages

  • Tracking the actual sale order quantity

    Hi Friends,
    How to track the actual sales order quantity given by the customer.
    Ex: we assume the customer has placed an order of 100 units and stock is only 90 so we create the sales order for 90 units only.
    How to find out the difference of 10 units as a report in standard sap system.
    Thanks
    AJ

    Dear AJ,
    This is how normal sales process works.
    You create Sales Order line item for the quantity that customer has requested. (eg: 100)
    Then you do a ATP for that Line item. Let's say you have only 90 in the stock. In that case system will confirm 90 for the sales order line item. (You can see the confirmed quantity in the Schedule line tab)
    Normally we don't change the LI quantity as per the ATP confirmed quantity (i.e 90). Because then we loose the visibility to the customers original requested quantity (i.e 100).
    Say you don't change your Line Item Order quantity to 90. Then your delivery & billing will be for 90.
    So you can see in VA05, Order quantity as 100 and confirmed quantity as 90.
    Your sales reports will show delivery & billing as 90. So that you have a clear visibility to the original order quantity, delivered quantity & billed quantity.
    Further if remaining (open) quantity 10 is appearing your MRP & creating troubles, please use Line Item Rejection Reason as Completed. So that everything is perfect.
    Coming back to your issue.
    Since your changing LI quantity to 90, you cant see 100 in the VA05 report. It always show the existing sales order line item quantity, which is 90 in this example.
    Only way you can find your original sales order quantity is in the Line Item / Change Log.
    This can be view by selecting below Menu option.
    Environment -> Changes
    If you execute it for the relevant Line Item, you can see the Change log. In that by double clicking relevant quantity change line, you  can see the old value & new value. (In this example 100 & 90)
    But that is not a good practice to do as changes will show all quantity changes that you might do based on  customer request. (Imagine if you customer ask to change it later to 95 not 100).
    In that case change log will display 100 to 95, then 95 to 90. So your loosing the required visibility.
    Hope this is helpful to you !

  • Unable to trace out the Reference Document number in commitment line item.

    Dear All,
          Kindly help me in bellow problem
    When I click the reference document no. in the line item wise display the commitment in t-code S_ALR_87013558 at that time the system open the display PR screen and the massage is displayed in the below, the Purchase document does not exist.
    Due to this reason the price capture in commitment line item is not traceable and I am not able to delete the commitment line item.
    Kindly suggest how to trace out the reference document number and delete it and release the commitment price.
    Thanks,
    Asu.

    >
    Asutosh Mahapatra wrote:
    > Dear All,
    >
    >       Kindly help me in bellow problem
    >
    >
    > When I click the reference document no. in the line item wise display the commitment in t-code S_ALR_87013558 at that time the system open the display PR screen and the massage is displayed in the below, the Purchase document does not exist.
    >
    > Due to this reason the price capture in commitment line item is not traceable and I am not able to delete the commitment line item.
    >
    > Kindly suggest how to trace out the reference document number and delete it and release the commitment price.
    >
    > Thanks,
    > Asu.
    Can you explain what is your requirement..?
    Do you want to correct the data in the report..?
    Or  it is effecting your availability control and you want to correct it..?
    Or you want to trace a deleted document..? Which is not possible...

  • Line item display on GL account

    DearAll,
    my GL is line item display already,then there are transactionts posted in that GL,but still no line item display?and i have to run RFSEPA01.
    but GL is line item display already,why still need that program to update the relevant table

    HI dear
    Plz chk when the line item display has been activated for that Gl account.
    If that has been activated in the mid of year/month you will not able to see the line items that are posted prior to activation
    so i can suggest you to deactivate the line item display and activate again
    It will work
    Thanks & regards
    Prasad

  • Additional fields for line item display for Vendor Accounts

    Hi,
    The additional fields for line item display have been defined for the vendor accounts. I am able to see the additional fields in SAP 4.7 system but not in ECC 6.0.
    Could you help me to know how the same will be displayed in ECC 6.0 system.
    Thanks

    In SPRO, Vendor Accounts -> Line Items -> Display Line Items -> Define Additional fields for Line item display, the fields for Check number from (PAYR-CHECF) and Tax Jurisdiction (BSEG-TXJCD) have been defined.
    When I am executing Vendor Line Item display (FBL1N), I am not able to select these fields for defining a layout. Could you please let me know, how I will get these fields in FBL1N.
    Thanks

  • No line item display after clering with F-03

    Dear Experts,
    After clearing with F-03 for rate differences, we had a doc number, but no line item display in that document.
    kindly advice.
    thank you

    Dear Prasada,
    thanks for the answer.
    This is clearing for exchange rate differences.
    usually the journal should be:
    dr     xxxxx- stock in transit     
    dr     xxxxx- stock in transit
    cr     yyyy - profit/loss exch rate variance
    cr     yyyy - profit/loss exch rate variance
    kindly advice
    thanks

  • Change the Sold to Party(SP) in sales order in change mode

    Hi,
    Is it possible to change the Sold to Party(SP) in sales order in change mode?
    If yes then How??
    Regards
    Somnath

    Hi somnath,
    It is very much possible to change the sold-to-party in the change mode of Sales order(VA02).
    Goto VA02-->enter the sale order number.
    Press enter.
    In the overview screen if you change the sold-to-party then every thing will be redetermined(Taxes and pricing procedure etc...).These will be determined from CMr etc.
    You cannot change the sold-to-party at the partners tab that is present in the Header details.
    It will be greyed out.
    If you change the sold-to-party at the overview screen as suggested earlier it will not apply to the item.
    You are also going to see this message while changing.
    And finally save the document.
    Regards,
    Krishna.

  • Need to make available the archived sales orders to view for end users.

    Hi All Exparts,
    I have one request to make available the archived sales orders to verify the goods issue for the end users.
    can you please guide me for the same with complete details steps. i will request for the all the steps serially.
    one more thing can i make it available with the help of the ABAP guys?
    Please guide me for the same.
    Thanks to all.
    Som.

    Hi Adithya,
    Thanks for ur kind reply. i entered in SARA and put the SD_VBAK also then in the below i can see in Action - preparation, archive, delete, Analyze, Management this things only...
    so please guide what to do next with the details.
    please also tell me through this can i make it available to the end users?
    pls let me know.
    Thanks again,
    Som.

  • How to avoid that two or more people alter the same Sales Order same time

    I'm looking for a way to avoid that two or more people altering the same Sales Order at the same time.
    If someone has entered a Sales Order in the system and something needs to be adjust it can be done by two or more people at the same time. The problem is that when someone is saving these changes, the changes of another person, who is still working on the same order, get lost.
    So what we need is an alert that someone is already using this order and that no other person can make any changes at that time. So the order needs to be blocked for altering for any other person at that time.
    To avoid this I think you have to do something with the Stored Procedure. Or has someone a more simple and better solution.
    I've already put this thread in the Business One forum and someone suggested to put it in the Business One SDK forum, as there isn't a solution in Business One itself.
    So if someone can give me a direction for a solution I would be very pleased.
    Best regards,
    Tim

    Hi Tim,
    The only thing that comes close to what you want in standard SBO is Data Ownership. However, this can't stop someone editing a document that is already being edited.
    You can't use stored procedures to track which document is open because the SBO_SP_TransactionNotification proc (which is the only one that you are able to customise) is triggered when a document is updated or added (or cancelled or closed) and not when the document is actually being edited in the user-interface.
    You could do this by writing an addon that uses the UI API to trap events in the sales order form. In theory, a sales order is being edited if the sales order form is in Update mode (ie in order for the form to be in Update mode, the user must have selected an existing document and changed the value of at least one field). You can trap the event of the user changing a value and then log the user and document in a table. When other users try to edit the same document, you could check the table and then prevent them changing values. When the first user clicks on the update button (or cancels the update or closes the form etc etc) you can remove the lock on the document. However, I have doubts as to how robust it would be. The problem with this kind of locking solution is that you sometimes get 'stranded' locks (eg user was editing a document when their workstation crashed) and the solution can end up being more troublesome than it is worth.
    Kind Regards,
    Owen

  • How to prevent modifying the same sales order in R/3 & CRM at the same time

    Guys,
    We are using CRM 5.0& R/3 4.6C. We have the middle set up. I have noticed that its possible to open the same sales order in R/3 and CRM in the change mode. I believe this could cause inconsistenices if the users modify the same order in different systems. Is there a standar way to prevent this from happening.
    Is there something like a change lock like we have the distribution lock?
    Anirudh

    Hi,
    As per OSS Note 705200 scenario X, Y and Z are supported with R/3 4.6C. Even if you use Scenario A, SAP wont support that. I would suggest sceario Z to be implemented. This would convert all the CRM order into R/3 order as soon as they are transferred to R/3. As a result the order can now only be modified in R/3 and all the changes would flow back into CRM maintaining the integrity between the systems.
    Refer to OSS Note 541113 for details.
    Regards,
    Gaurav Gera

  • Storing the Material Sale Order Wise

    In our Scenario PO is made Sale Order wise, but when the Material is received and entered in the Stock, it become difficult to indetify the Material which has come against which SO.
    My requirement is that if the Material is received Sale Order Wise then it shud be saved in the Store Sale Order Wise and also at the same time it will be issued Sale Order wise, to keep the track of material being issued against Sale Order Wise.
    i hope i have cleared my query, any clues.....
    abhishek suppal

    Hi,
    When you are trying to create PO with reference to SO what is the item category used in SO, Use item category as "TAB" then SO will generate a Purchase Requisition. Convert this Purchase requisition in to Purchase Order, account assignment will be copied as "E Individual Customer stock" Sales order and Cost element will populate from PR.
    When you post the GR for above PO, the stock is managed as Special Stock indicator "E" sales order stock, in MMBE also it displays as SO stock.At the time of GR value is booked to SO and stock will be shown in MMBE.
    This stock is reserve for particular SO against which you have procured, but you can transfer post the same from SO stock to your OWN stock
    Hope this clarifies,
    Thanks & Regards,
    Sridhar

  • Report to see the Blocked Sales orders

    Hi friends,
       Is there any standard report to view the Blocked Sales orders in SAP.
    Please help me out.
    Thanks in Advance,
    Regards,
    Anvita.

    Hi Anvitha,
    You can try one of the following transactions:
    VE31     Blocked SD Documents
    VKM1     Blocked SD Documents
    V.14     Sales Orders Blocked for Delivery
    V23     Sales Documents Blocked for Billing
    VA14L     Sales Documents Blocked for Delivery
    Cheers,
    Bhanu

  • How can I use the field "Sales Order" on derivation?

    Dear All.
    This is about PA characteristic derivation.
    I want to change the characteristic value "Sales Order (KAUFN)" by derivation.
    But I cannot select the characteristic field on target field.
    The field "Sales order(KAUFN)" doesn't exist there.
    Why? How can I use the field "Sales Order" on derivation?
    Y.C.Bae

    Hi Bae,
    in order to be able to choose fields KAUFN (for sales order) and KDPOS
    (for sales order item) as target fields of derivation step 'enhancement'
    you have to modify the coding of subroutine EXIT  GET_ALLOWED_TARGETS
    in program RKEDRCOPA like this:
        NAME-IDENTIFIER = 'CO-PA'.
        NAME-TABNAME = FIELDTAB_ENTRY-TABNAME.
        NAME-FIELDNAME = FIELDTAB_ENTRY-FIELDNAME.
        IF FIELDTAB_ENTRY-USGFL CA 'DUV'
    BEGIN OF INSERTION *****
             OR FIELDTAB_ENTRY-FIELDNAME = 'KAUFN'
             OR FIELDTAB_ENTRY-FIELDNAME = 'KDPOS'
    END   OF INSERTION *****
             OR FIELDTAB_ENTRY-FIELDNAME = 'KNDNR'
             OR FIELDTAB_ENTRY-FIELDNAME = 'ARTNR'
    Actually sales order number and sales order item shouldn't be changed
    by derivation (therefore they are no valid target fields in standard)
    but if you need to fill them within an enhancement this modification
    will help you to define them as valid target fields. But this is just
    the technical frame so far; the logic from which table you'd like to
    derive the sales order number correctly depends on your implementation
    of the enhancement! I just want to ask you to be rather careful with
    the implementation of the exit so that the sales order number isn't
    changed in cases that shouldn't be concerned.
    Regards,
    Abhisek

  • How to sets the Reason for Rejection of the Open Sales Order Lines

    Hello gurus,
              I want to set the Reason for Rejection of the Open Sales Order Lines, Case is like :
    If current date is exeed the Auto Void Confirmed Back Order Days(for item level) +  date (last responding from customer), then reason for rejection should be set, So i want the logic to find out the date is exceed or not.
    Thanks
    Anjana

    Hello anjana,
       Actually your question is some confusing, but if u want to get eldest change as active sales order then logic is as follows:
    1.  On base of OBJNR u have to get UDATE from JCDS table
    2. then write logic as:
    SORT i_jcds BY objnr stat chgnr DESCENDING.
          LOOP AT i_jcds INTO wa_jcds1.
            CLEAR lv_stat.
            lv_stat = wa_jcds1-stat.
            AT NEW objnr.
              AT NEW stat.
                CLEAR: wa_tab.
                wa_tab-objnr = wa_jcds1-objnr.
                wa_tab-stat = lv_stat.
              ENDAT.
            ENDAT.
            IF wa_jcds1-inact = 'X'.
              CLEAR lv_tabix.
              IF sy-tabix > 1.
                lv_tabix = sy-tabix - 1.
              ELSE.
                lv_tabix = 1.
              ENDIF.
              READ TABLE i_jcds INTO wa_jcds2 INDEX lv_tabix.
              IF sy-subrc = 0.
                wa_tab-chgnr = wa_jcds2-chgnr.
                wa_tab-udate = wa_jcds2-udate.
                wa_tab-utime = wa_jcds2-utime.
                APPEND wa_tab TO i_tab.
              ENDIF.
              CONTINUE.
            ELSE.
              wa_tab-chgnr = wa_jcds1-chgnr.
              wa_tab-udate = wa_jcds1-udate.
              wa_tab-utime = wa_jcds1-utime.
            ENDIF.
            AT END OF objnr .
              AT END OF stat.
                APPEND wa_tab TO i_tab.
              ENDAT.
            ENDAT.
          ENDLOOP.
          DELETE ADJACENT DUPLICATES FROM i_tab COMPARING objnr stat.
          SORT i_tab BY objnr stat udate utime.
          DELETE ADJACENT DUPLICATES FROM i_tab COMPARING objnr.
    3. now in i_tab table u'll get eldest UDATE
    Hope its work for u.
    Thanks & Regards,
    Sumit Joshi

  • Re: Cancelling the entire Sales Order

    Hi Guys
    I wanted to know if there is a way to cancel the entire Sales Order @header level?
    Out business can have items as many as 150+ placed on a sales order. And cancelling each item individually by entering the Reason for Rejection might be inefficient.
    Can anyone suggest another way of acheving the same.
    Thanks
    Vinit

    Dear Mr.Lakshmipathi
    The CRTL + F 10  if you give Reason of rejection it straight away assign the same reason of rejection to all the line items in the sales order not for  the first line item only as you mentioned
    I have personally tested this with 15 line items just  now
    I am extremely sure of what i have written
    This functionality has been suggested by  to our clients in practical scenarios and tested by me now also
    When i suggest something i am doubly sure of that and test it and then suggest
    Moreover this Reason of rejection in all the line items  (in all the 15 in my case)
    are in the editable mode only so that we can change it someother key for one or two line items if we want
    sir
    when you have asked  or suggested something i am doubly sure if my reply
    Regards
    Raja

Maybe you are looking for

  • HT5706 How do I update my software on my Apple TV if the television isn't supporting my ATV anymore since the last update. Can I update through iTunes?

    Since I last updated ATV my own tv no longer supports my ATV. On my HDMI channel it is picking up different Hz levels ranging from 18 Hz to 180 Hz when ATV is plugged in. A few times some white lines have appeared on the screen as though it is trying

  • Old iPhone won't turn on

    So I activated my new iPhone and then I was doing something on my old iPhone and it froze up. So I held down home and power to restart it and now it won't turn on. The apple comes up and stays for a while but then the screen just goes black. Any idea

  • How can I receive data and print them in the smartform INTNOM2_N1?

    Hi experts!! I've to receive data from some tables and print them into the smarform INTNOM2_N1, for example I need to receive the data stext from the table hrp1000, but when I tried to do this, this doesn't work SELECT SINGLE STEXT FROM HRP1000 INTO

  • Resizing JPEG images

    Hey guys, I have the following code: public static void resize(String original, String resized, int size,                               int dimension, float factor)             throws Exception         if ((dimension != HEIGHT) && (dimension != WIDTH

  • Firefox using much CPU; how to find the offending tab/URL?

    My Firefox 32 .0 is using lots of CPU, and it frequently goes into "not responding" state. I restarted in safe mode, and the same condition happened. Is there any way for me to determine what tab(s)/URL(s) are causing the problem? I really do not wan