Get all service order's based on Installed base?

Hi Expert,
Whats FM's or tables and their relationship for getting service order based on Ibase number?
Thnx,
AK

hey,
Following are the tables:CRMD_SRV_REFOBJ, CRMD_SRV_OSSET to get Service order guid as below sample code.:
FUNCTION z_get_order_from_ibase.
*"*"Local Interface:
*"  IMPORTING
*"     REFERENCE(IV_IBASE) TYPE  IB_IBASE
*"  EXPORTING
*"     REFERENCE(ET_GUID_LIST) TYPE  CRMT_OBJECT_GUID_TAB
   TYPES: BEGIN OF ty_ibase,
             guid TYPE crmt_object_guid,
          END OF ty_ibase.
  DATA: lv_ibguid   TYPE guid_16,
        lt_guid_ref TYPE STANDARD TABLE OF ty_ibase,
        lt_guid_set TYPE STANDARD TABLE OF ty_ibase,
        lt_guid     TYPE crmt_object_guid_tab.
  CHECK iv_ibase IS NOT INITIAL.
  SELECT SINGLE ib_guid_16 FROM ibib INTO lv_ibguid WHERE ibase = iv_ibase.
  CHECK sy-subrc EQ 0.
  SELECT guid_ref FROM crmd_srv_refobj INTO TABLE lt_guid_ref WHERE ib_comp_ref_guid = lv_ibguid.
  CHECK sy-subrc EQ 0.
  SELECT guid_set FROM crmd_srv_osset INTO TABLE lt_guid_set FOR ALL ENTRIES IN lt_guid_ref WHERE guid = lt_guid_ref-guid.
  CHECK sy-subrc EQ 0.
  SELECT guid_hi FROM crmd_link  INTO TABLE lt_guid FOR ALL ENTRIES IN lt_guid_set WHERE guid_set = lt_guid_set-guid.
  et_guid_list = lt_guid.
ENDFUNCTION.
Hope it will help you.
Regards,
Arjun

Similar Messages

  • How to link Sales Order with Service Contract and then with Install Base?

    Hi Friends,
    1) I would like to know the integeration process from sales order to Service Contract and then with Install Base.
    2) I couldn't see anything enabled in Service Tab in Order Lines, its grayed out. Is there any set up/profile option to get it enabled?
    3) How can we create AR invoice from Service Contract?
    Please let me know if anyone has idea on this.
    Thanks in Adavance,
    Vara

    Dear Sid,
    Thanks for your promt response.
    Let me explain you what I did.
    1) I have booked a Bill Only sales order which has one order line, mentioned it as Service Item and provided the same details in Service Tab in Order lines. Now Line status is "Fulfilled"
    2) Then Submitted Workflow Back Ground Process for OM Order Lines and it has created an AR Invoice and closed the line
    3) And then submitted "Service Contracts Order Capture Integration Program" from SErvice Contracts Responsibility and it completed normal.
    4) Now I went in to Launch Contracts Window and queried with the sales order but couldn't see any contract created
    5) Then I went in to Reprocess Order Window and found this order shows an error message as "Referenced Product not present in the Installed Base", then I tried to reprocessed it, but the same error message again.
    Here I have few doubts:
    1) Are the AR invoice and Service Contract Billing Invoices same?
    2) In above scenario AR Invoice has been created, I would like to do the billing from SErvice Contracts and need to create an Invoice in AR? how can I do that?
    because as you explained in one of my questions earlier, A Single Invoice can be created for the whole duration of the contract. I want to do that and trying for the same.
    3) Regarding the above error message, how can I resolve it and create the service contract against that Order?
    Thank you so much for your helpful answers.
    Regards,
    Vara

  • Get the sales order number based on customer number

    HI all,
    how can i get the sales order numbers based on the customer number?
    plz tell me the table names.
    thanks,
    Srini

    hiiiii..
    go to database table VBAK
    where you can find customer id and sales order
    use a select statement in your report program
    and key as kunnr ...
    i hope it does ...the job

  • Hello, my question is that I have bought so many apps and I have formatted my iMac cause I wanted to install parallels desktop. and now all apps I lost them I need to get all de order history to reinstall them again. what I have to do?

    I want may be to recovery all my apps als OSX Mountain Lion, OSX Lion, Archipad, Viapad, and so on , so on

    Who can hepls me toget them back even all the order history cause many others apps I don't remember at all. Please help me

  • Service order search based on IBASE is not working

    Hi All,
    I am facing one Issue in CRM web ui..when we search service order based on the referenced installed base id it's not returning the proper result..if we have multiple service orders for the IBASE id it's returning only few values some times even though if we have service order associated with IBASE id it's not returning any value..
    I am guessing it's returning wrong result..
    I wanted to check which logic has been written for this search result or is it using any search help table.. Could you please help me where we can find the logic written for this search criteria..
    Please find the screen shot for your reference..I appreciate your help in advance..
    Thanks,
    Susan.

    Hello,
    I found the following:
    If you fill someting in the fields REFOBJ_IBASE, this value is being converted into a GUID internally
    This happens in function CRM_BSP_OIC_1O_SEARCH_FROM_RF
    So you have to make sure that the search field REFOBJ_IBASE points towards the field CRMD_SRV_REFOBJ~GUID_OBJECT ( via table CRMC_REPDY )
    And even then I have the impression it only works when you only fill the Ibase in the order. When you fill the component there is a different GUID.
    In my case I found out it is even more complex, so I will need to create my own search field (extend search structure )
    Regards,
    Erwin

  • Service order creation based on counter reading assigned to the Ibase.

    Hi All,
    I've created a service contract (ZXXX) with the item category (ZIT1) of service plan.
    In the item category (ZIT1) definition i've copied the standard item cat. of service plan (SPLA) and assigned the standard date profile SERVPLAN to the item category.
    Requirement - Service order has to be created automatically if the counter reading assigned to the Ibase is greater than counter reading that is maintained in the service plan template that is assigned to the service plan product(Item) in the service contract transaction.
    Master Data -
    Service Interval Template - Created service plan template for counter based interval and maintained the interval as 100HR.
    Assigned the template to service plan product(item) which is assigned in the service contract.
    Created a counter ID and assigned the counter to the Ibase.
    In the item date profile SERVPLAN , I've assigned the date rule (Planned time based on the counter reading) to 'Release date' date type.
    In the item action profile ., Action is defined as it should create a service order (ZSER) with the template defined in the item if the (Release date =< today's date) as start condition.
    I've maintained the complete master data.
    Now Release date should be picked based on the counter reading of the Ibase assigned to the service plan item in the service contract.
    If Ibase counter reading > counter reading maintained in the interval the release date = todays date.
    If Ibase counter reading < counter reading maintained in the interval the release date = future date.
    which is not happening now in my case. service order is getting created even the counter reading of Ibase is less than the interval.
    Please let me know if further more changes to be done to map the scenario.
    Thanks
    Syam

    Hello,
    I found the following:
    If you fill someting in the fields REFOBJ_IBASE, this value is being converted into a GUID internally
    This happens in function CRM_BSP_OIC_1O_SEARCH_FROM_RF
    So you have to make sure that the search field REFOBJ_IBASE points towards the field CRMD_SRV_REFOBJ~GUID_OBJECT ( via table CRMC_REPDY )
    And even then I have the impression it only works when you only fill the Ibase in the order. When you fill the component there is a different GUID.
    In my case I found out it is even more complex, so I will need to create my own search field (extend search structure )
    Regards,
    Erwin

  • Update Service order status based on Sales order billing status

    Hi All,
    Pls give some suggestions for below scenario.
    Sales order will be created from Service order.
    Service order should get completed once the sales order is billed fully.
    Billing status is available in Sales order header. When ever billing is created, sales order status get updated.
    Where I need to have the trigger (User exit etc...) to update the service order status w.r.t sales order billing status.
    Rgds,
    Senni.B

    Hi,
    As standard the system update service status, maybe some config is missing. Please check the copy control conditions in SD.
    Hope this help.
    Regards.

  • How can I get all my photo out after I instal Iphoto 11/9/2/1

    Hi: I update my Iphoto 11/9.2.1 But I cannot load all my photo from the photos liabary

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • How to get all production orders for a workcenter

    Hello ...
    I have a requirement to create a report of all production orders for a given workcenter.  The user enters the workcenter (CRHD-ARBPL), plant (CRHD-WERKS) and a date range, and wants to see a list of orders (AUFNR) that fall within that date range along with some other data from AFKO and AFPO. 
    I can't figure out a good, consistent way to get from workcenter to production orders.
    Any ideas?
    Thanks!
    Sharon

    Hi there check this program for relation between SO PO and Production order
    REPORT z_so_info.
    TABLES: vbak, vbap, afko, afpo.
    *Field catalog
    TYPE-POOLS: slis.
    DATA: lv_repid TYPE sy-repid VALUE sy-repid,
    xfield TYPE slis_t_fieldcat_alv,
    afield TYPE slis_fieldcat_alv.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(25) text-002.
    SELECT-OPTIONS: so_so FOR vbak-vbeln OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-003.
    PARAMETERS:
    p_kunnr LIKE vbak-kunnr, " sold-to
    p_kunwe LIKE vbak-kunnr. " ship-to
    SELECTION-SCREEN END OF BLOCK b2.
    *Constants
    CONSTANTS: c_zor TYPE vbak-auart VALUE 'ZOR',
    c_we TYPE vbpa-parvw VALUE 'WE',
    c_ag TYPE vbpa-parvw VALUE 'AG'.
    * c_space TYPE space.
    *Ranges
    RANGES: ra_parvw FOR vbpa-parvw,
    ra_kunnr FOR vbpa-kunnr.
    *Tables
    DATA: BEGIN OF gt_output OCCURS 0,
    vbeln LIKE vbak-vbeln, " sales order number
    posnr LIKE vbap-posnr, " SO item number
    matnr LIKE vbap-matnr, " material number
    sh LIKE vbpa-kunnr, " Ship-to
    sp LIKE vbpa-kunnr, " Sold-to
    lifnr LIKE ekko-lifnr, " Vendor
    bstnk LIKE vbak-bstnk, " PO number
    banfn LIKE vbep-banfn, " Purchase requi
    po_st TYPE char30, " PO status text
    pstyv TYPE vbap-pstyv, " Item catagory
    aufnr LIKE afpo-aufnr, " Production Order
    prd_stat TYPE string, " Prd order status
    END OF gt_output.
    DATA: wa_output LIKE gt_output.
    FIELD-SYMBOLS: <fs_output> LIKE gt_output.
    *Table for sales order and PO
    TYPES : BEGIN OF gs_data,
    vbeln TYPE vbak-vbeln,
    posnr TYPE vbap-posnr,
    pstyv TYPE vbap-pstyv,
    matnr TYPE vbap-matnr,
    END OF gs_data.
    DATA: gt_data TYPE STANDARD TABLE OF gs_data,
    wa_data TYPE gs_data.
    *Table for Production Orders
    TYPES: BEGIN OF gs_prd,
    aufnr TYPE afpo-aufnr,
    posnr TYPE afpo-posnr,
    kdauf TYPE afpo-kdauf,
    kdpos TYPE afpo-kdpos,
    wepos TYPE afpo-wepos, "Goods Receipt Indicator
    elikz TYPE afpo-elikz, "Delivery Completed Indicator
    objnr TYPE aufk-objnr, "Object number
    * getri TYPE afko-getri, "Confirmed Order Finish Date
    * gltri TYPE afko-gltri, "Actual finish date
    END OF gs_prd.
    DATA: gt_prd TYPE STANDARD TABLE OF gs_prd,
    wa_prd TYPE gs_prd.
    *Table for partner data
    TYPES: BEGIN OF gs_partner,
    vbeln TYPE vbak-vbeln,
    posnr TYPE vbap-posnr,
    parvw TYPE vbpa-parvw,
    kunnr TYPE vbpa-kunnr,
    END OF gs_partner.
    DATA: gt_partner TYPE STANDARD TABLE OF gs_partner,
    wa_partner TYPE gs_partner.
    TYPES: BEGIN OF gs_po,
    ebeln TYPE ekkn-ebeln,
    ebelp TYPE ekkn-ebelp,
    vbeln TYPE ekkn-vbeln,
    vbelp TYPE ekkn-vbelp,
    END OF gs_po.
    DATA: gt_po TYPE STANDARD TABLE OF gs_po,
    wa_po TYPE gs_po.
    TYPES: BEGIN OF gs_preq,
    vbeln TYPE vbep-vbeln,
    posnr TYPE vbep-posnr,
    banfn TYPE vbep-banfn,
    END OF gs_preq.
    DATA: gt_preq TYPE STANDARD TABLE OF gs_preq,
    wa_preq TYPE gs_preq.
    TYPES: BEGIN OF gs_po_stat,
    ebeln TYPE ekko-ebeln,
    procstat TYPE ekko-procstat,
    lifnr TYPE ekko-lifnr,
    END OF gs_po_stat.
    DATA: gt_po_stat TYPE STANDARD TABLE OF gs_po_stat,
    wa_po_stat TYPE gs_po_stat.
    *Field symbols
    FIELD-SYMBOLS: <fs> TYPE tj02t-txt04,
    <fs_temp> TYPE tj02t-txt04,
    <fs_stat> TYPE char30.
    START-OF-SELECTION.
    PERFORM fr_build_range.
    PERFORM fr_get_data.
    PERFORM fr_build_fc.
    PERFORM fr_output.
    *& Form fr_get_data
    * text
    * --> p1 text
    * <-- p2 text
    FORM fr_get_data.
    *Get SO
    SELECT a~vbeln a~posnr a~pstyv a~matnr
    FROM vbap AS a
    JOIN vbak AS b
    ON a~vbeln = b~vbeln
    JOIN vbpa AS c
    ON b~vbeln = c~vbeln
    INTO TABLE gt_data
    WHERE b~vbeln IN so_so
    AND b~auart EQ c_zor "Only Sales Orders
    AND c~kunnr IN ra_kunnr. "from selection screen
    DELETE ADJACENT DUPLICATES FROM gt_data COMPARING vbeln posnr.
    *get data of the production order
    IF NOT gt_data[] IS INITIAL.
    SELECT a~aufnr a~posnr a~kdauf a~kdpos a~wepos a~elikz
    b~objnr
    FROM afpo AS a
    JOIN aufk AS b
    ON a~aufnr = b~aufnr
    INTO TABLE gt_prd
    FOR ALL ENTRIES IN gt_data
    WHERE a~kdauf EQ gt_data-vbeln
    AND a~kdpos EQ gt_data-posnr.
    ENDIF.
    *Get partner data
    IF NOT gt_data[] IS INITIAL.
    SELECT vbeln posnr parvw kunnr
    FROM vbpa
    INTO TABLE gt_partner
    FOR ALL ENTRIES IN gt_data
    WHERE vbeln EQ gt_data-vbeln.
    ENDIF.
    *Get Purchase Order
    IF NOT gt_data[] IS INITIAL.
    SELECT ebeln ebelp vbeln vbelp
    FROM ekkn
    INTO TABLE gt_po
    FOR ALL ENTRIES IN gt_data
    WHERE vbeln EQ gt_data-vbeln
    AND vbelp EQ gt_data-posnr.
    SELECT vbeln posnr banfn
    FROM vbep
    INTO TABLE gt_preq
    FOR ALL ENTRIES IN gt_data
    WHERE vbeln EQ gt_data-vbeln
    AND posnr EQ gt_data-posnr.
    ENDIF.
    IF NOT gt_po[] IS INITIAL.
    SELECT a~ebeln a~procstat a~lifnr
    FROM ekko AS a
    JOIN ekpo AS b
    ON a~ebeln = b~ebeln
    INTO TABLE gt_po_stat
    FOR ALL ENTRIES IN gt_po
    WHERE b~ebeln EQ gt_po-ebeln
    AND b~ebelp EQ gt_po-ebelp.
    ENDIF.
    *Move data to output table
    LOOP AT gt_data INTO wa_data.
    wa_output-vbeln = wa_data-vbeln.
    wa_output-posnr = wa_data-posnr.
    wa_output-pstyv = wa_data-pstyv.
    wa_output-matnr = wa_data-matnr.
    READ TABLE gt_po INTO wa_po WITH KEY vbeln = wa_data-vbeln
    vbelp = wa_data-posnr.
    IF sy-subrc EQ 0.
    wa_output-bstnk = wa_po-ebeln.
    READ TABLE gt_po_stat INTO wa_po_stat WITH KEY ebeln = wa_po-ebeln.
    IF sy-subrc EQ 0.
    wa_output-lifnr = wa_po_stat-lifnr.
    CASE wa_po_stat-procstat.
    WHEN '01'.
    wa_output-po_st = 'Version in process'.
    WHEN '02'.
    wa_output-po_st = 'Active'.
    WHEN '03'.
    wa_output-po_st = 'In release'.
    WHEN '04'.
    wa_output-po_st = 'Partially released'.
    WHEN '05'.
    wa_output-po_st = 'Released Completely'.
    WHEN '08'.
    wa_output-po_st = 'Rejected'.
    ENDCASE.
    ENDIF. "inner read subrc
    ENDIF. "outer read subrc
    READ TABLE gt_preq INTO wa_preq WITH KEY vbeln = wa_data-vbeln
    posnr = wa_data-posnr.
    IF sy-subrc EQ 0.
    wa_output-banfn = wa_preq-banfn.
    ENDIF.
    READ TABLE gt_prd INTO wa_prd WITH KEY kdauf = wa_data-vbeln
    kdpos = wa_data-posnr.
    IF sy-subrc EQ 0.
    wa_output-aufnr = wa_prd-aufnr.
    *get the purchase requisition for production order as well
    SELECT SINGLE banfn
    FROM ebkn
    INTO wa_output-banfn
    WHERE aufnr EQ wa_prd-aufnr.
    *Get the status of the production order
    PERFORM fr_get_prd_stat USING wa_prd-objnr
    CHANGING wa_output-prd_stat.
    ENDIF. " sy-subrc
    READ TABLE gt_partner INTO wa_partner WITH KEY vbeln = wa_data-vbeln
    parvw = c_we.
    IF sy-subrc EQ 0.
    wa_output-sh = wa_partner-kunnr.
    ENDIF.
    READ TABLE gt_partner INTO wa_partner WITH KEY vbeln = wa_data-vbeln
    parvw = c_ag.
    IF sy-subrc EQ 0.
    wa_output-sp = wa_partner-kunnr.
    ENDIF.
    APPEND wa_output TO gt_output.
    CLEAR: wa_data, wa_prd,wa_partner,wa_output.
    ENDLOOP.
    ENDFORM. " fr_get_data
    *& Form fr_build_range
    * text
    * --> p1 text
    * <-- p2 text
    FORM fr_build_range .
    *Range for partner function
    MOVE 'I' TO ra_parvw-sign.
    MOVE 'EQ' TO ra_parvw-option.
    MOVE 'SH' TO ra_parvw-low. " we
    APPEND ra_parvw.
    CLEAR ra_parvw.
    MOVE 'I' TO ra_parvw-sign.
    MOVE 'EQ' TO ra_parvw-option.
    MOVE 'SP' TO ra_parvw-low. " ag
    APPEND ra_parvw.
    CLEAR ra_parvw.
    *Range for ship-to and sold-to
    MOVE 'I' TO ra_kunnr-sign.
    MOVE 'EQ' TO ra_kunnr-option.
    MOVE p_kunnr TO ra_kunnr-low.
    APPEND ra_kunnr.
    CLEAR ra_kunnr.
    MOVE 'I' TO ra_kunnr-sign.
    MOVE 'EQ' TO ra_kunnr-option.
    MOVE p_kunwe TO ra_kunnr-low.
    APPEND ra_kunnr.
    CLEAR ra_kunnr.
    ENDFORM. " fr_build_range
    *& Form fr_build_fc
    * text
    * --> p1 text
    * <-- p2 text
    FORM fr_build_fc .
    * sales order number
    afield-fieldname = 'VBELN'.
    afield-seltext_s = 'Sales #'.
    afield-ref_tabname = 'VBAK'.
    APPEND afield TO xfield. CLEAR afield.
    * sales ITEM number
    afield-fieldname = 'POSNR'.
    afield-seltext_s = 'Item #'.
    afield-ref_tabname = 'VBAP'.
    APPEND afield TO xfield. CLEAR afield.
    * Material Number
    afield-fieldname = 'MATNR'.
    afield-seltext_s = 'Material #'.
    afield-ref_tabname = 'VBAP'.
    afield-outputlen = 10.
    APPEND afield TO xfield. CLEAR afield.
    *Vendor Number
    afield-fieldname = 'LIFNR'.
    afield-seltext_s = 'Vendor Num.'.
    afield-ref_tabname = 'EKKO'.
    APPEND afield TO xfield. CLEAR afield.
    * ship-to-party
    afield-fieldname = 'SH'.
    afield-seltext_s = 'Ship-to'.
    afield-ref_tabname = 'VBPA'.
    APPEND afield TO xfield. CLEAR afield.
    * sold-to-party
    afield-fieldname = 'SP'.
    afield-seltext_s = 'Sold-to'.
    afield-ref_tabname = 'VBPA'.
    APPEND afield TO xfield. CLEAR afield.
    *PO number
    afield-fieldname = 'BSTNK'.
    afield-seltext_s = 'PO NUM'.
    afield-ref_tabname = 'EKKO'.
    APPEND afield TO xfield. CLEAR afield.
    *PO status
    * afield-fieldname = 'PO_STAT'.
    * afield-seltext_s = 'Step'.
    * afield-ref_tabname = 'zbacklog_v2'.
    * APPEND afield TO xfield. CLEAR afield.
    *PO step status
    afield-fieldname = 'PO_ST'.
    afield-seltext_s = 'PO.Status'.
    afield-ref_tabname = 'zbacklog_v2'.
    APPEND afield TO xfield. CLEAR afield.
    *Purchase requisition
    afield-fieldname = 'BANFN'.
    afield-seltext_s = 'Pur. Req.'.
    afield-ref_tabname = 'VBEP'.
    APPEND afield TO xfield. CLEAR afield.
    *Item catagory
    afield-fieldname = 'PSTYV'.
    afield-seltext_s = 'Itm. Catg'.
    afield-ref_tabname = 'VBAP'.
    APPEND afield TO xfield. CLEAR afield.
    *Prodcution Order number
    afield-fieldname = 'AUFNR'.
    afield-seltext_m = 'Prod.Order'.
    afield-ref_tabname = 'AFKO'.
    APPEND afield TO xfield. CLEAR afield.
    *PRODCUTION status
    afield-fieldname = 'PRD_STAT'.
    afield-seltext_s = 'Prd. Step'.
    afield-ref_tabname = 'zbacklog_v2'.
    afield-outputlen = 20.
    APPEND afield TO xfield. CLEAR afield.
    *PRODUCTION step status
    * afield-fieldname = 'PRD_ST'.
    * afield-seltext_s = 'Prd. Status'.
    * afield-ref_tabname = 'zbacklog_v2'.
    * APPEND afield TO xfield. CLEAR afield.
    ENDFORM. " fr_build_fc
    *& Form fr_output
    * text
    * --> p1 text
    * <-- p2 text
    FORM fr_output .
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    * I_CALLBACK_PF_STATUS_SET = ' '
    * I_CALLBACK_USER_COMMAND = ' '
    * I_STRUCTURE_NAME =
    * IS_LAYOUT =
    it_fieldcat = xfield[]
    i_default = 'X'
    i_save = 'A'
    TABLES
    t_outtab = gt_output
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    ENDFORM. " fr_output
    *& Form fr_get_prd_stat
    * text
    * -->P_WA_PRD_OBJNR text
    FORM fr_get_prd_stat USING p_objnr CHANGING p_prd_stat.
    DATA: lt_status TYPE STANDARD TABLE OF jstat,
    wa_status TYPE jstat,
    lv_status TYPE tj02t-txt04,
    lv_temp2 TYPE char5,
    lv_buff TYPE string.
    CALL FUNCTION 'STATUS_READ'
    EXPORTING
    client = sy-mandt
    objnr = p_objnr
    only_active = 'X'
    TABLES
    status = lt_status
    EXCEPTIONS
    object_not_found = 1
    OTHERS = 2.
    LOOP AT lt_status INTO wa_status.
    IF wa_status-stat(1) EQ 'I'.
    SELECT txt04 FROM tj02t
    INTO lv_status
    WHERE istat EQ wa_status-stat
    AND spras EQ 'E'.
    ENDSELECT.
    lv_temp2 = lv_status.
    CONCATENATE lv_temp2 p_prd_stat INTO p_prd_stat
    SEPARATED BY ','.
    ENDIF.
    CLEAR: wa_status, lv_status, lv_temp2.
    ENDLOOP.
    lv_buff = p_prd_stat.
    *Status of Production Order
    IF lv_buff CS 'CRTD'.
    p_prd_stat = 'Not Active'.
    ENDIF.
    IF lv_buff CS 'REL'.
    IF lv_buff CS 'GMPS'.
    p_prd_stat = 'Printed In Prod'.
    ELSE.
    p_prd_stat = 'Printed'.
    ENDIF.
    ENDIF.
    IF lv_buff CS 'TECO'.
    p_prd_stat = 'Technically Compt.'.
    ENDIF.
    ENDFORM. " fr_get_prd_stat

  • Getting all possible ordering of vector

    hello
    I need to find all possible order of a set of vector I mean if I have the following:
    0
    1
    2
    all posssible would be:
    0 1 2, 1 0 2, 2 1 0, 1 2 0, 2 0 1, 0 2 1
    I have tried to use the swap but I didn't get all possible set
    I have used the following code:
    Code:
    for( int x=0;x<vector.size();x++)     {            
    for ( int w=0;w< vector.size();w++){
    Collections.swap(vector, x, w);}}
    as I said before the swap method didn't provide me the result I want
    can somebody tell me how to do it please urgent

    warnerja wrote:
    rdkh wrote:
    Sorry I had to wait a few days to do this for you. Here is a "very creative" solution:
    ... (code snipped)If by "very creative" you mean "incorrect" or at least "convoluted", then you're right.As I always ask questions, I watch for any chance to contribute to the forum. But as I don't have confidence and knowledge, I only post info I read in a book or google, and code that compiles/works correctly. As far as I can test, my code works correctly.
    I was inspired by a "very creative" way to calculate "pi" using a circle in a square and random numbers. With modern processors, knowing where to start and end is sometimes enough. Let my CPU tear into the problem, keep guessing to get "pi" to infinite precision, let the computer keep guessing until the requested collection of Vectors is found. While not AI, I find elegence in this approach.
    P.S.
    if(!used.contains(rnd)) {
    used.add(rnd);
    v.add(rnd);What's the point of both "used" and "v" containing exactly the same set of values? One of these is redundant.
    And have you heard about Random.nextInt(int n)?I just know very basic APIs (thats why I hang-out only on "New to Java" forum). As you told me: "Set<Integer> used = new HashSet<Integer>();" was not needed.
    And a special "thank you" goes out to you for trying to do a lazy bum's homework for him/her. May you end up "working with" such a person.ok, but I warned that my code is "proof of concept" and I said I wrote it just for fun, and it works correctly.
    Edited by: rdkh on Jan 11, 2010 4:58 PM

  • Where do i can get the service order attachment details

    Hi Guys,
    I am developing a report, which it needs to delete the attachments for the particular service order, in which details i can the service order attachment details.
    Thanks,
    Gourisankar.

    Dear Gourisankar,
    Did you get any help or solve this issue since i face the same problem and i could not find a solution

  • How to get CRM service order data in R/3

    Hi,
    I want to retrieve service order data from CRM system to R/3, is there any FM for this. Please help as i am new to CRM
    Thanks
    Bobby

    Hi Bobby,
    It is very much possible to upload CRM service orders to SAP R/3 or SAP ECC via standard CRM middleware.
    Please refer to the below SAP help document for complete list of configuration activities for service order upload.
    http://help.sap.com/saphelp_crm50/helpdata/en/f0/5d583c65399965e10000000a114084/frameset.htm
    <b>Do not forget to reward if it helps</b>
    Regards,
    Paul Kondaveeti

  • Settlement Rule for service order created based on sales order

    Hello,
    I am creating a sales order and entering  WBS as an cost object.
    After creation of sales order the Service order is created.
    For service order type in the settlement profile  WBS is maintained.
    But the system is not copying the WBS in Service order which is maintained in sales order.
    Can any body have an idea on this?
    Regards
    Abhijit

    Hi,
    As far as my understanding when service order is created through sales order then settlement rule is SDI and its item number
    Not what you maintained in account assignment tab of sales order
    When you settle service order then cost will settle on sales document and its item and then latter you settle sales order then settlement receiver is WBS element which you maintained in account assignment tab
    Kapil

  • I need to get the service order number in the error message

    i need to display the error message with the service order number telling that
    "record does not exist for service order xxxxxxxxx"
    xxxxx-should be the service order number.

    you can define a error no. in message class se91.
    if the error is suppose 101.
       101 - Record does not exist for service &
    use & to concatenate ur variable with the message.
    if you want more than one just addon & to that
    like 4 varibles
       101 - Record does not exist for service & & & &
    in ur code, u can display the message like
    MESSAGE i(ZE)101 with variable
    ZE is ur message class

  • Getting all service names and users

    Hi all,
    Can i ger all service names in database and users related to that service names .
    Thanks in advance.

    Hi,
    I don't think that's possible in one query given the fact that you can connect to only one instance/database at a time...
    You could post this question also at the [Database-General|http://forums.oracle.com/forums/forum.jspa?forumID=61&start=0] forum, though...

Maybe you are looking for

  • Database access question

    How does Discoverer work in regards to accessing the data (not the EUL tables)? If the owner of the tables is left blank in the EUL, does it use the User Id of the person logging into the tool or does it use the owner of the EUL? I know in Business O

  • Using a Tree as a menu

    I have a a tree being used as a kind of file browser. Like so: Is there a way to get the path to this item? So Menswear -> Sportswear-> Tops. Maybe in a list or an array? Whatever is best to pass it to my php script. 3 variables A B C would do the tr

  • 11.03 does not play on pressing play

    Hi, Itunes was open and then I put in my external audio-interface (usb - DJ8 - Native Instruents) in the slot. itunes then did not play the music, pressing play did not work. in versions before 11.xx it took a second and the interface worked, but not

  • Where can I find firefox 3.5 for linux?

    I need to install firefox 3.5 for linux, in order to use a plugin which only works on that version. However I can't seem to locate a working link to download 3.5 for linux anywhere on the web.

  • Time Machine and Aperture

    As a Mac user who has both lost and retrieved files in the past, I really appreciate Time Machine. As an Aperture user, I wish Time Machine would back up Aperture such that such retrieval could also be simple and straight-forward. Do you think this w