How to get PERSON_RESP value? (Sales Order)

Hello experts,
I am extremely new to ABAP programming. I am learning BOL programming, creating BAdI's and all that stuff and to be honest I don't really get it.
First of all I would appreciate directions where I may find valuable information. How to determine which table do I need, what method is designed to do what thing.
Right now I am struggling with creating a BAdI (actually modifying the order_save one). I want to put into DESCRIPTION field the following values: CREATED_AT, CREATED_BY, current date (date-sylo) and PERSON_RESP. I wrote or actually copied from the Internet most of working code. Now my BAdI works almost what I wanted it to work except it doesn't put into description PERSON_RESP value, because I don't know where to find it. There is no PERSON_RESP value inside crmt_orderadm_h_wrk table.
I will be very grateful for any clues and advices.
Looking forward hearing from you.
Thank you in advance

hi
Once deleted it is not possible to know the details of sales order.
for deleted sales orders and who deleted check table <b>"cdhdr" and "cdpos".</b>
goto se16 and try with the above tables
chages header and item respectively
regards

Similar Messages

  • How to get a Deleted Sales Order Header Data ?

    Hi Guys,
                   I need to get KNUMV field of deleted sales order to track the deleted entries in KONV table.
    But when I check in CDPOS, I am getting only the sales order NO. but not full header data of the deleted sales order or
    is there is any history table maintained for KONV ?
    My requirement is to update a custom defined table having same entries like KONV, which is used to update Data warehouse system.
    Thanks
    AJ

    Whenever any condition record is deleted then there is a deletion indicator at the Condition record level which get activated and through this field you can track then the condition record which are deleted. At this moment, i don't have access to SAP system and i unable to highlight the exact table name, please check the SAP standard table KONV for deletion indicator.
    thanks
    chaitanya

  • How to get know the Sales Order IDOC#, if I know the created Sales Order#?

    Hi Experts,
    Let me know that, How to get know the IODC #, if I know the Sales Order#?
    Scenario is that, sales order(say 12345678) was created from Inbound EDI. I also Know the MATERIAL too.
    So, How to pull the associated Inbound ORDERS idoc, which is created this Sales order-12345678?
    Is it from EDID4 table? or EDIDC? or any thing else?
    reples r appreciated.
    thanq
    Edited by: SAP ABAPer on Sep 8, 2008 5:29 AM

    Hello
    This can be done much easier using fm SREL_GET_NEXT_NEIGHBORS:
    Input:
    OBJECT-OBJKEY = <number of sales order>  " with leading zeros!!!
    OBJECT-OBJTYPE = 'BUS2032'
    MAX_HOPS = '01'
    Result:
    NEIGHBORS-OBJKEY = <IDoc number with leading zeros>
    NEIGHBORS-OBJTYPE = 'IDOC'
    NEIGHBORS-ROLETYPE = 'INIDOC'.
    Regards
      Uwe

  • How to get PO from sales order item in CRM

    Hi,
    I am building a BI extractor which needs PO for a given complaint. I am able to get the sales order/item for a complaint using crm_order_read FM. Is there anyway to get the PO based on this SO-item. Are their tables that link these two.
    Thanks!

    Table CRMD_ORDERADM_I -> Give Item GUID in filed GUID and get the document header guid in field HEADER. Then use function module CRM_ORDER_READ and table ET_SALES to get the Sales Data for the right item. The PO you are interested in can be any of the fields related to PO in this set. Usually it is PO_NUMBER_UC.
    Alternately, if you want to use only the table reads use this.
    1. Table CRMD_LINK --> get the record with GUID = Item GUID and OBJTYPE_SET = 11 (for Sales Set)
    2. Table CRMD_SALES --> get the record with GUID = CRMD_LINK-GUID_SET
    Get your PO information from this Sales set record for your item. But since, PO is usually associated with the header, you can do the same as above but with the GUID = Header GUID in the CRMD_LINK table.

  • How to get all open sales orders of a customer and also account group

    I want to know the logic to find all open sales orders of a customer and also account group

    Hi,
    You can check the status weather a Sales order is Open or not by checking its billing status form the following:
    Check table VBUK and VBUP for delivery status "LFSTK" and billing status "FKSTK".
    Rward points if helpful answer.
    Ashven

  • How to get the ammendment sales order number and original sales order no?

    Hello sir's,
    Please tell me the table for ammendment(revised) sales order number and original sales order no.
    Thanks in advance,
    vikram

    Solved

  • How to get GP% in Sales Order

    Dear SBO experts. I have a request from my client where they wanted to see the GP% in the sales order. Can anyone help me with the steps please?
    BGee Shekar

    Hi,
    I used the existing Comm. % field and allocated the following query (tested on 2007 SP00 PL47)
    SELECT $[$38.123.NUMBER]/$[$38.21.NUMBER]*100
    My GP is set on ItemCost <> Sales price. It works like a charm when refreshing on Price After Discount.  You can use that to block the user above a certain GP% in the SBO_SP_TransactionNotification.
    N'joy,
    Frederic

  • How to upload a CRM sales order to R/3 after modifying some values in CRM

    Hi All
    How to upload a CRM sales order to R/3 after modifying  some values in CRM ?
    In other words
      You have a Sales Order in CRM. While sending this Sales Order to R/3, we would like to modify certain values in the Order before it is replicated to R/3 . How do u do that?
    Thanks
    Jaman
    Message was edited by: Sap_Crm_Guy
    Message was edited by: Sap_Crm_Guy

    Hi Jaman,
    Try to have a look at the function group CRM_ORDER_API. In there you will find several useful functions. CRM_MAINTAIN_ORDER can most probably do what you want to do, but it is not simple to figure out how to use it as it is not very well documented.
    There is a BADI called ORDER_SAVE with three methods that you can implement. This BADI allows you to manipulate the order before it is saved and before it is replicated to R/3.
    Very best regards,
    Anders Mørk

  • How to get the values from popup window to mainwindow

    HI all,
       I want to get the details from popup window.
          i have three input fields and one search button in my main window. when i click search button it should display popup window.whenever i click on selected row of the popup window table ,values should be visible in my main window input fields.(normal tables)
       now i am able to display popup window with values.How to get the values from popup window now.
       I can anybody explain me clearly.
    Thanks&Regards
    kranthi

    Hi Kranthi,
    Every webdynpro component has a global controller called the component controller which is visible to all other controllers within the component.So whenever you want to share some data in between 2 different views you can just make it a point to use the component controller's context for the same. For your requirement (within your popups view context) you will have have to copy the component controllers context to your view. You then will have to (programmatically) fill this context with your desired data in this popup view. You can then be able to read this context from whichever view you want. I hope that this would have made it clear for you. Am also giving you an [example|http://****************/Tutorials/WebDynproABAP/Modalbox/page1.htm] which you can go through which would give you a perfect understanding of all this. In this example the user has an input field in the main view. The user enters a customer number & presses on a pushbutton. The corresponding sales orders are then displayed in a popup window for the user. The user can then select any sales order & press on a button in the popup. These values would then get copied to the table in the main view.
    Regards,
    Uday

  • How to retrieve the ARCHIVED Sales order data

    Hi All,
    When issuing the output for the delivery, it is giving an error saying 'Sales Order XXXX does not exist' due to which the prices in the output were displayed as '0'. Reason for this can be that 'the order might have been archived'.
    My requirement is,
    1. If Sales Order doesnu2019t exist in data base then need to check if Sales order exists in archive data base.
    2. If  yes, take needed data from archive data base tables to calculate price. The logic of price calculation should be the same as for not archived Sales Orders.
    Can anyone help me on this..?
    Please tell me how to check whether the Sales order exists in the Archived database. Please share the table names(sample logic if possible) sothat I can use them in the report logic.
    Please tell me how to pull the data from the archive database tables to calculate the price.
    Thank you in advance.
    Thanks & Regards,
    Paddu.
    Edited by: Paddu K on Feb 23, 2009 3:42 PM

    *&      Form  get_archive_data
    *       Fetch Archive Data
    FORM get_archive_data .
      CLEAR:    g_read_handle, g_commit_cnt,
                g_read_cnt, g_reload_cnt,it_rel_tab,it_bseg_a,it_bkpf_a,
                it_bset_a, gt_result.
      REFRESH: it_rel_tab[],it_bseg_a[],it_bkpf_a[],
               it_bset_a[], gt_result[].
    *Populating selection screen fields to field-symbols
      PERFORM build_fs_select_options.
    *Call FM as_api_read  FI Data
      CALL FUNCTION 'AS_API_READ'
        EXPORTING
          i_fieldcat                      = 'SAP_FI_DOC_002'
          i_selections                    = ft_selections[]
    *   I_OBLIGATORY_FIELDS             =
    *   I_MAXROWS                       =
       IMPORTING
         e_result                        = gt_result[]
    EXCEPTIONS
       parameters_invalid              = 1
       no_infostruc_found              = 2
       field_missing_in_fieldcat       = 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.
      IF NOT gt_result[] IS INITIAL.
    *Sorting by KEY and Offset
        SORT gt_result BY archivekey archiveofs.
    *To delete duplicates
        DELETE ADJACENT DUPLICATES FROM gt_result COMPARING archivekey
        archiveofs.
    *looping the internal table
        LOOP AT gt_result.
    *Get read handle for  object
          CALL FUNCTION 'ARCHIVE_READ_OBJECT'
            EXPORTING
              object         = 'FI_DOCUMNT'
              archivkey      = gt_result-archivekey
              offset         = gt_result-archiveofs
            IMPORTING
              archive_handle = g_read_handle
            EXCEPTIONS
              OTHERS         = 1.
          IF NOT sy-subrc IS INITIAL.
            MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            EXIT.
          ENDIF.
          IF sy-subrc = 0.
    *Get Acoounting Document details
            PERFORM object_read_opened
                      TABLES it_rel_tab
                             it_bseg_a
                             it_bkpf_a
    *                         it_bset_a
    *                         it_bsik_a
    *                         it_bsak_a
                             it_bsid_a
                             it_bsad_a
    *                         it_bsec_a
                      USING g_read_handle
                            l_archobj
                            g_commit_cnt
                            g_read_cnt
                            g_reload_cnt
          ENDIF.
    *close the file.
          CALL FUNCTION 'ARCHIVE_CLOSE_FILE'
            EXPORTING
              archive_handle          = g_read_handle
            EXCEPTIONS
              internal_error          = 1
              wrong_access_to_archive = 2
              OTHERS                  = 3.
          IF sy-subrc <> 0.
            MESSAGE i004." 'Unable to close archive session'.
            EXIT.
          ENDIF.
        ENDLOOP.
      ELSE.
        MESSAGE i000 WITH 'No data found for Archived data'(095).
        EXIT.
      ENDIF.
    *Start of Changes by GTHATIKONDA on 10/17/2008 #ECDK902204
      IF NOT it_bkpf_a[] IS INITIAL.
        SORT it_bkpf_a BY belnr.
        DELETE ADJACENT DUPLICATES FROM it_bkpf_a COMPARING belnr.
        DELETE it_bkpf_a WHERE budat GT p_budat. "#ECDK902206
      ENDIF.
    *Start of Changes by GTHATIKONDA on 10/17/2008 #ECDK902206
      IF it_bkpf_a[] IS INITIAL.
        MESSAGE i000 WITH 'No data found for Archived data'(095).
      ENDIF.
    *End of Changes by GTHATIKONDA on 10/17/2008 #ECDK902206
      IF NOT it_bseg_a[] IS INITIAL.
        SORT it_bseg_a BY belnr gjahr buzei.
        DELETE ADJACENT DUPLICATES FROM it_bseg_a COMPARING
                                              belnr gjahr buzei.
      ENDIF.
    *End of Changes by GTHATIKONDA on 10/17/2008 #ECDK902204
    ENDFORM.                    " get_archive_data
    *&      Form  build_fs_select_options
    FORM build_fs_select_options .
      REFRESH:  ft_selections.
    *Comapny code
      APPEND INITIAL LINE TO ft_selections ASSIGNING <fw_selections>.
      <fw_selections>-fieldname  = 'BUKRS'.
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_bukrs  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    *Customer
      APPEND INITIAL LINE TO ft_selections ASSIGNING <fw_selections>.
      <fw_selections>-fieldname  = 'KUNNR'.
      LOOP AT s_kunnr.
        APPEND INITIAL LINE TO <fw_selections>-selopt_t
               ASSIGNING <lw_selopt>.
        MOVE-CORRESPONDING  s_kunnr TO <lw_selopt>.
      ENDLOOP.
    *Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    **Customer Group
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname  = 'KTOKD'.
    *  loop at s_ktokd.
    *    append initial line to <fw_selections>-selopt_t
    *           assigning <lw_selopt>.
    *    move-corresponding  s_ktokd to <lw_selopt>.
    *  endloop.
    *End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    *Profit Center
      APPEND INITIAL LINE TO ft_selections ASSIGNING <fw_selections>.
      <fw_selections>-fieldname  = 'PRCTR'.
      LOOP AT s_prctr.
        APPEND INITIAL LINE TO <fw_selections>-selopt_t
               ASSIGNING <lw_selopt>.
        MOVE-CORRESPONDING  s_prctr TO <lw_selopt>.
      ENDLOOP.
    *Commented #ECDK902210
    **Key Date
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname  = 'BUDAT'.
    *  append initial line to <fw_selections>-selopt_t assigning <lw_selopt>
    *  move p_budat  to <lw_selopt>-low.
    *  move  'I' to <lw_selopt>-sign.
    *  move  'EQ' to <lw_selopt>-option.
    *Aging Period1
      APPEND INITIAL LINE TO ft_selections ASSIGNING <fw_selections>.
      <fw_selections>-fieldname  = 'ANZTA'.
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_ag1  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    *Aging Period2
    *Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname  = 'ANZTA'.
    *End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_ag2  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    *Aging Period3
    *Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname  = 'ANZTA'.
    *End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_ag3  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    *Aging Period4
    *Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname  = 'ANZTA'.
    *End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_ag4  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    *Aging Period5
    *Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname = 'ANZTA'.
    *End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_ag5  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    ENDFORM.                    " build_fs_select_options
    *&      Form  object_read_opened
    *       To Fetch Arichive Data
    FORM object_read_opened TABLES   it_rel_tab
                                      it_bseg_a
                                      it_bkpf_a
    *                                  it_bset_a
    *                                  it_bsik_a
    *                                  it_bsak_a
                                      it_bsid_a
                                      it_bsad_a
    *                                 it_bsec_a
                             USING value(g_read_handle) LIKE sy-tabix
                                   value(l_archobj) LIKE arch_def-object
                             value(g_commit_cnt) LIKE arch_usr-arch_comit
                               g_read_cnt TYPE i
                               g_reload_cnt TYPE i.
      DATA: BEGIN OF table_wa ,
               table LIKE arch_stat-tabname,
            END  OF table_wa.
      DATA: lit_data(2048) TYPE c OCCURS 1 WITH HEADER LINE.
      DATA:  l_structure LIKE arch_stat-tabname,
             l_lin TYPE i.
      CLEAR: it_table_org1,lit_struc,it_table_org2,table_wa,it_rel_tab.
      REFRESH: it_table_org1[],lit_struc[],it_table_org2[],it_rel_tab[].
      CLEAR: g_duprec,g_read_cnt,g_reload_cnt,g_object_cnt.
    *Read  data from the infostructure
      DO.
        ADD 1 TO g_object_cnt.
        CLEAR l_structure.
        CALL FUNCTION 'ARCHIVE_GET_NEXT_RECORD'
          EXPORTING
            archive_handle                = g_read_handle
         IMPORTING
           record                        = lit_data
    *   RECORD_CURSOR                 =
    *   RECORD_FLAGS                  =
           record_structure              = l_structure
    *   RECORD_LENGTH                 =
    *   RECORD_REF                    =
         EXCEPTIONS
           end_of_object                 = 1
           internal_error                = 2
           wrong_access_to_archive       = 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.
          EXIT.
        ENDIF.
        IF NOT l_structure IS INITIAL.
          table_wa-table = l_structure.
          APPEND table_wa TO it_rel_tab.
        ENDIF.
        APPEND lit_data.
        CLEAR l_lin.
        FIELD-SYMBOLS: <fs_struc> TYPE c.
        CASE l_structure.
    *BKPF data
          WHEN 'BKPF'.
            ASSIGN it_bkpf_a TO <fs_struc> CASTING.
            <fs_struc> = lit_data.
            APPEND it_bkpf_a.
    *BSID data
          WHEN  'BSID'.
            ASSIGN it_bsid_a TO <fs_struc> CASTING.
            <fs_struc> = lit_data.
            APPEND it_bsid_a.
    *BSAD data
          WHEN  'BSAD'.
            ASSIGN it_bsad_a TO <fs_struc> CASTING.
            <fs_struc> = lit_data.
            APPEND it_bsad_a.
    *BSEG data
          WHEN 'BSEG'.
            ASSIGN it_bseg_a TO <fs_struc> CASTING.
            <fs_struc> = lit_data.
            APPEND it_bseg_a.
        ENDCASE.
        REFRESH lit_data.
        CLEAR g_object_cnt.
      ENDDO.
    ENDFORM.                    " object_read_opened
    *&      Form  get_bsid_bsad_archive_data
    *If Exclude Spl. GL Trnasaction is initial get BSID BSAD Archive data  *
    FORM get_bsid_bsad_archive_data .
    *Work Area
      DATA: wa_bsid TYPE type_bsid.
    *Reading BSAD Archive internal table
    *      loop at it_bsad_a   where bukrs eq p_bukrs
    *Start of changes by GTHATIKONDA on 10/14/2008 #ECDK902180
    *Commented by GTHATIKONDA on 10/17/2008 #ECDK902204
      LOOP AT it_bkpf_a  WHERE  bukrs = p_bukrs AND
                                budat LE p_budat. "#ECDK902206
    *End of changes by GTHATIKONDA on 10/14/2008 #ECDK902180
        LOOP AT it_bseg_a   WHERE bukrs EQ p_bukrs AND
                                  belnr EQ it_bkpf_a-belnr AND
                                  gjahr EQ it_bkpf_a-gjahr AND
                                  augdt GT p_budat AND
    *                            koart eq 'D'     and
                                  kunnr IN s_kunnr AND
                                  prctr IN s_prctr.
    *Changes by GTHATIKONDA on 10/17/2008 #ECDK902204
    *    loop at it_bkpf_a  where budat le p_budat."#ECDK902206
    *Move corresponding fiels
          MOVE-CORRESPONDING it_bseg_a TO wa_bsid.
          wa_bsid-blart = it_bkpf_a-blart.
          wa_bsid-budat = it_bkpf_a-budat.
          wa_bsid-bldat = it_bkpf_a-bldat.
          APPEND wa_bsid TO i_bsad.
          CLEAR wa_bsid.
        ENDLOOP.
      ENDLOOP.
      IF NOT i_bsad[] IS INITIAL.
        APPEND LINES OF i_bsad TO i_bsid.
      ENDIF.
    *Start of Changes by GTHATIKONDA on 10/17/2008 #ECDK902206
      IF NOT i_bsid[] IS INITIAL.
        SORT i_bsid BY belnr.
    *Commenting this logic by GTATIKONDA on 10/31/2008 #ECDK902245
    *  delete adjacent duplicates from i_bsid comparing belnr.
      ENDIF.
    *End of Changes by GTHATIKONDA on 10/17/2008 #ECDK902206
    ENDFORM.                    " get_bsid_bsad_archive_data
    *Reading BSAD Archive internal table
    *      loop at it_bsad_a  where bukrs eq p_bukrs
    *Start of changes by GTHATIKONDA on 10/14/2008 #ECDK902180
    *Commented by GTHATIKONDA on 10/17/2008 #ECDK902204
      LOOP AT it_bkpf_a  WHERE bukrs = p_bukrs AND  "#ECDK902206
                               budat LE p_budat.
    *End of changes by GTHATIKONDA on 10/14/2008 #ECDK902180
        LOOP AT it_bseg_a  WHERE bukrs EQ p_bukrs AND
                                 belnr EQ it_bkpf_a-belnr AND
                                 gjahr EQ it_bkpf_a-gjahr AND
                                 kunnr IN s_kunnr AND
                                 umskz EQ space AND
                                 augdt GT p_budat AND
                                 prctr IN s_prctr.
    *Changes by GTHATIKONDA on 10/17/2008 #ECDK902204
    *    loop at it_bkpf_a  where budat le p_budat. "#ECDK902206
    *Move corresponding fiels
          MOVE-CORRESPONDING it_bseg_a TO wa_bsid.
          wa_bsid-blart = it_bkpf_a-blart.
          wa_bsid-budat = it_bkpf_a-budat.
          wa_bsid-bldat = it_bkpf_a-bldat.
          APPEND wa_bsid TO i_bsad.
          CLEAR wa_bsid.
        ENDLOOP.
      ENDLOOP.
      IF NOT i_bsad[] IS INITIAL.
        APPEND LINES OF i_bsad TO i_bsid.
      ENDIF.

  • How to find out the Sales order no based on spool no

    Hi Experts,
    Anyone tell me how to find out the Sales order no based on Spool no.
    Thanks and regards,
    Amjad

    Hello Mohammed,
    Please check the following SAP Spool tables for your spool request.
    You will find your required document number as an Object key in these tables.
    TSCMSTAT   --> Field OBJNO
    SOOS           --> Field APPLKEY (Document number will be a part of this key)
    If your document is getting printed by SAP Script, then dont forget to take SCR value in the OBJTP field while searching for your record.
    Thanks and Best Regards,
    Vikas Bittera.
    ***Points for Usefull answers ***

  • How to get each value from a parameter passed like this '(25,23,35,1)'

    Hi
    One of the parameter passed to the function is
    FUNCTION f_main_facility(pi_flag_codes VARCHAR2) return gc_result_set AS
    pi_flag_codes will be passed a value in this way '(25,23,35,1)'
    How to get each value from the string
    like 25 first time
    23 second time
    35 third time
    1 fourth time
    I need to build a select query with each value as shown below:-
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3, code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 25 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q1,
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3,code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 23 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q2,
    (SELECT t2.org_id, RTRIM(xmlagg(xmlelement(e, t4.description || ';')
    ORDER BY t4.description).EXTRACT('//text()'), ';') AS DESCRIPTION
    from org_name t2, ref_org_name t3,code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 35 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date
    group by t2.org_id) q3,
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3, code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 1 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q4
    Please help me with extracting each alue from the parm '(25,23,35,1)' for the above purpose. Thank You.

    chris227 wrote:
    I would propose the usage of regexp for readibiliy purposes and only in the case if this doesnt perform well, look at solutions using substr etc.
    select
    regexp_substr( '(25,23,35,1)', '\d+', 1, 1) s1
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 2) s2
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 3) s3
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 4) s4
    from dual 
    S1     S2     S3     S4
    "25"     "23"     "35"     "1"In pl/sql you do something like l_val:= regexp_substr( '(25,23,35,1)', '\d+', 1, 1);
    If t2.att_type is type of number you will do:
    t2.att_type= to_number(regexp_substr( '(25,23,35,1)', '\d+', 1, 1))Edited by: chris227 on 01.03.2013 08:00Sir,
    I am using oracle 10g.
    In the process of getting each number from the parm '(25,23,35,1)' , I also need the position of the number
    say 25 is at 1 position.
    23 is at 2
    35 is at 3
    1 is at 4.
    the reason I need that is when I build seperate select for each value, I need to add the query number at the end of the select query.
    Please see the code I wrote for it, But the select query is having error:-
    BEGIN
    IF(pi_flag_codes IS NOT NULL) THEN
    SELECT length(V_CNT) - length(replace(V_CNT,',','')) FROM+ ----> the compiler gives an error for this select query : PLS-00428:
    *(SELECT '(25,23,35,1)' V_CNT  FROM dual);*
    DBMS_OUTPUT.PUT_LINE(V_CNT);
    -- V_CNT := 3;
    FOR L_CNT IN 0..V_CNT LOOP
    if L_CNT=0 then
    V_S_POS:=1;
    V_E_POS:=instr(pi_flag_codes, ',', 1, 1)-1;
    else
    V_S_POS:=instr(pi_flag_codes,',',1,L_CNT)+1;
    V_E_POS:=instr(pi_flag_codes, ',', 1, L_CNT+1)-V_S_POS;
    end if;
    if L_CNT=V_CNT then
    V_ID:=TO_NUMBER(substr(pi_flag_codes,V_S_POS));
    else
    V_ID:=TO_NUMBER(substr(pi_flag_codes,V_S_POS,V_E_POS));
    end if;
    VN_ATYPE := ' t2.att_type = ' || V_ID;
    rec_count := rec_count +1;
    query_no := 'Q' || rec_count;
    Pls help me with fetching each value to build the where cond of the select query along with the query number.
    Thank You.

  • How to get a value from an object

    Here is the concept of something I want to do in PowerShell:
    $exp = get-process explorer | select *
    $pms64 = get_value( $exp, PagedMemorySize64 )
    As I see it, the value would be available to use.  Using that technique I could get other values then order them to write to a log file. 
    How should I do this? 
    Please make the answer as simple as possible.  What search term can I use to find a tutorial on this topic?
    ~jag77 We need to know what a dragon is before we study its anatomy. (Bryan Kelly, 2010)

    Hi,
    Here's a simple way to get at a single property:
    $pms64 = (Get-Process explorer).PagedMemorySize64
    $pms64
    For the purpose of writing to a log file, you'd be better off piping the object through Select-Object to get the properties you're interested in and then into Export-Csv or Out-File to create the output.
    Get-Process explorer |
    Select-Object -Property Name,Id,PagedMemorySize64 |
    Export-Csv .\explorerStats.csv -NoTypeInformation
    Some reading material:
    http://windowsitpro.com/powershell/powershell-objects
    EDIT: Also, I do highly recommend that you look through the link jrv has posted. There's good information there.
    Don't retire TechNet! -
    (Don't give up yet - 13,225+ strong and growing)

  • Getting the open sales orders and open deliveries valies

    Hi SDNs,
    I have a requirement that i need to get the all sales orders open values and delivery values. I need to build a logic for this scenario. could you please provide the logic for getting the open sales order values for respective customer.
    Please provide logic instead of standard reports. That would be very useful
    Thanks in advance
    Regards,
    K

    Please provide logic instead of standard reports.
    Really surprising !!!!!!!!!
    But still I would like you to have a look at VA05 where both open quantity and open order value will flow.  If you still feel to get the related tables, you can consider VBBE where you can get open order quantity
    thanks
    G. Lakshmipathi

  • Quantity getting confirmed in sales order without any stock.

    Hi
    My issue is that , the schedule lines are getting confirmed in sales order , even though i have not posted any stock. How to prevent this from happening ?

    Hi Jalaj001, 
    --Go to T.Code  MM02 & in Sales:General/plant data assign availability check as 01 or 02 instead of KP.
    --In MRP 1 -mention MRP Type as PD-Planned MRP
    --Go VOV6 & select your Schedule line category & check mark the Availability
    --Go T.Code OVZ9 & select your availability check control & uncheck the Check without RLT in Replenishment lead Time.
    Let me know if your problem is solved
    Regards
    Pradeep

Maybe you are looking for

  • Report-Recipe Details

    Hai all,            I am working on a Report of displaying all the FG materials for a given Generic Bulk material. Also the desc, plant, base quantity, min and max lot size of both generic and FG. the output should be as shown below: Material        

  • How to display XML file as is it is in my browser using servlets???

    I have a question like my servlet receives an XML file in its request object. I just need display the same XML file as it is in my browser. How to do that? Please help me out. I have searched so many blogs, but i did not get right solution. My XML fi

  • Need solution for a Reporting Requirement

    Hello Experts, I need design a solution for Report, where in I need to show ageing of Invoice based of Due date of Invoice for last four weeks as explained below: In cube i have records like this: Industry       Invoice Number      Due Date      Amou

  • How to view Logged in User's sessions

    Dear Portal gurus, Pls let me know how I can view logged in user's session s. Thanks. Jack

  • Can I create a SOAP message object from a string?

    can i create a soap message object in saaj with a string containing soap xml? I know messageFactory has a constructor that public abstract SOAPMessage createMessage(MimeHeaders headers, InputStream in) does anyone know how to use this? Specifically t