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

Similar Messages

  • How to get open production orders by plant wise

    Hi,
    How to get open production orders by plant wise.
    i know from tcode COOIS, is it possible to get from this. if so what are the parameters we have to give to get open production orders by plant wise.
    is there any tcode or tables available , please provide details .
    regards,
    Hari priya

    Hi,
    What is your definition of Open Production Orders?
    Definetly you will get the report from COOIS for Plant wise.
    Whther you want to consider all the Orders having the Status REL but not DLV?
    Then there is a chance of having the Orders, still with PDLV status but GR is done for the full Qty. May be you don't want to consider the TECO status, eventhough the Order is short closed??
    Better to ommit the Orders with CRTD status also..
    So, based on this which status to consider and which status not to consider..
    You can define the "Selection profile status" in BS42.
    Use this selection profile in COOIS, so that the rsults will be accurate..
    Best Regards,
    Siva

  • How to get List of Orders for given BP

    Hi,
    I want to get the Sales Orders for a given list of Business Partners (Partner Func '00000001'). I tried to use
    BAPI_BUSPROCESSND_GETDETAILMUL but this BAPI needs to Transaction Header GUID as import parameter ti get the detail. SO does the FM CRM_ORDER_READ
    What I want is a Class/BAPI/FM that will give me a list of Sales Order Header GUID's based on a List of Business Partners
    Thanks

    Hello,
    Check function module CRM_BUPA_READ_ORDER_OBJECTS. It will get all document associated to a business partner.
    Kind regards.

  • How to get all GL accounts for each account in a given bank...

    Hello Experts,
    Is there a way to get all GL accounts for each account in a given house bank?
    IN our company, there are 5 GL accounts for each bank so 1 GL for 1 account. they are for recon, payables,
    receivables, etc. I checked table T012K but it only shows the main GL account. Hope you
    can help me guys. Thank you and take care!

    Try this.. it is based on company code
    here it_cocodes is an internal table containing company codes
      DATA: BEGIN OF it_glaccount OCCURS 0,
        bukrs TYPE bukrs,
        saknr TYPE saknr,
        txt50 TYPE txt50_skat,
       END OF it_glaccount.
      DATA it_glaccount_wa LIKE it_glaccount.
    LOOP AT it_cocodes INTO it_cocodes_wa WHERE ktopl <> ''.
        SELECT bukrs saknr FROM skb1
          INTO CORRESPONDING FIELDS OF it_glaccount_wa
          WHERE bukrs = it_cocodes_wa-bukrs.
          IF sy-subrc = 0.
            SELECT SINGLE txt50 FROM skat INTO it_glaccount_wa-txt50
              WHERE spras = 'E' AND ktopl = it_cocodes_wa-ktopl
              AND saknr = it_glaccount_wa-saknr.
            APPEND it_glaccount_wa TO it_glaccount.
            CLEAR it_glaccount_wa-txt50.
          ENDIF.
        ENDSELECT.
    loop at it_glaccount into it_glaccount_wa.
    write:/....
    endloop.
    refresh...
    clear...
    endloop.

  • How to get list of orders for current date.

    Hi,
    My requirement is to get list of orders for the date on which order was created such that I don't have to change the date in my application.
    Every time I run my application it should generate orders created on that current date without manually giving current date.
    This has to be done directly using BAPI and without creating a RFC. 
    I tried with bapi " BAPI_ALM_ORDERHEAD_GET_LIST " using parameter OPTIONS_FOR_START_DATE  but there I can't enter sy-datum and hence, every time I hence to change the date.
    Please tell me if there is any possible way to get fulfil above requirement.
    Thanks.
    Shilpi Agarwal.

    Hi Shilpi,
    This looks simple to me.
    Just create a variant in IW38 with U_your UserId as shown in the picture (Dynamic date selection for Created On set to Current Date)
    The status settings obviously would be
    Jogeswara Rao K

  • How do we do production orders for same item code in different sizes

    Hi,
    We have Items which we buy as a single sheet of material and our customers can ask for us to cut the complete sheet into different sizes before despatching it. i.e
    Item Code Sheet1: Sheet size 100mm x 100mm
    Customer asks for sheet to be cut into 10 off 10mm x 10mm sheets, which we presently put on the sales order as a line note
    We then generate a production order for this item and indicate on the production order printout the line note
    We've recently had a customer who has asked for Item 1 in two different sizes on the same sales order ie
    Order Line 1 Sheet1 Qty:1 Line note: cut into 10mm x 10mm sheets
    Order Line 2 Sheet1 Qty:1 Line note: cut into 50mm x 50mm sheets
    When generating the Production order SAP combines the items into
    Product No: Sheet1
    Planned Qty: 2
    Where as we want it to create 2 production orders 1 of each different sizes items.
    I know I can create BOMs for those two sizes, but customers can ask for the sheets to be cut to whatever size they want. Is the best method to create BOMs on the fly for each different sizing option or are there alternative methods that are easier to manage ?
    Thanks
    Carl

    Hi Carl Rutter,
    You have to creat 2 special production order for this item. when issue the component make sure you issue the stock as per the cosumption becaue one have 10mmx10mm and the another item have 50x50 in this case you issue component by square inch wise. for example 10*10 = 100 squre inch.
    50*50 = 2500 square inch so the cost will be approtionate. you can Use multiple uom method to obtain this, other wise you have covert into stock then you issue the component. If you want traxk size wise ,you can use batch option for Finishe goods.
    Regards
    Sridharan

  • How to get all oneorder header_guids for a specific reference PRODUCT_ID?

    Hi,
    in servicerequest we add iobjects as reference objects.
    The iobject represents the machine a customer has an issue with.
    Within the iobject master we have a PRODUCT_ID. The product_ID represents the machine type.
    So:
    1 product_id could have 1:n iobjects (machines)
    1 servicerequest has 1:1 iobject.
    The requirement is to select all oneorder documents with a specific product_id within the assigned iobject.
    I do not realy know which database tables i have to join?
    Or is there already a function module in standard which can be used?
    Thank you
    Kind regards
    Manfred

    Hi,
    OBJECT_ID can´t be the import parameter for IOBJECTs because it is from type CRMT_OBJECT_ID - which is the ID of transactions and not IOBJECTs.
    I have played arround with this function module CRM_SERVICE_PORTAL_SEARCH but haven´t found an option to get all servicerequests (one order documents) for a specific reference object or a list of reference objects.
    Are there other ideas how to use this or another function module for my requirement.
    Thanks a lot.
    Kind regards
    Manfred

  • How to get all products on same apple id

    How do I get all of my apple products onto the same apple id? When I go through itunes -> account information -> manage devices -> I only see 1 device and no option to add more...

    Welcome to the Apple Community.
    All you need to do is log into each account on each device with the same ID. Note, there are several accounts you can use your ID with such as iTunes, iCloud, iMessage, MAS etc etc. You may need to delete some accounts in order to enter different details (ie iCloud on an iOS device).

  • How to get Initial Production Order Qty?

    Hi Gurus,
    I need to stage initial production order quantity in BW. How can i do that? Is there any change record management or table in R/3 from which I can get the Initial Productin order qty?
    Regards,
    Gaurav

    Hi !
    I was having a look at "2LIS_04_P_MATNR", 
    The underlyning tables for this are AFPO and AFKO.
    We have a field "PSMNG" - Item Quantity Order. I think corresponds to your requirment ....
    Also, have a look at the folowing link ..
    http://help.sap.com/saphelp_nw70/helpdata/EN/88/7fc73c0c52085be10000000a114084/frameset.htm
    Hope it helps !
    Please update me if it works for you !
    Award points if it is helpful.
    Regards
    Anshul

  • How to review all process order for a month.

    Hi,
    I need advice to review all process order in a month in order to ensure Actual quantity usage for product (BOM) is correct without missing the quantity?
    Thank you.
    Br. Hadi

    Hi Hadi,
    Use report COOISPI with list as Components and input as process order numbers. In the output layout you can see the Requirement qty field which is qty as per process order BOM and Qty withdrawn which is the actual issue qty. From the layout you also select Pegged requirement field which display the components parent material.
    You also check MB24 - Reservation List against the process order number which also display the required qty, issued qty and difference.
    Thanks & Regards,
    Ramagiri

  • How to get all authorization objects for a certain authorization profile

    Hi ABAP experts,
    I have the following problem: for a certain authorization profile of a role (created with transaction PFCG) I would like to get all contained authorization objects: e.g. for the contained object PLOG I would like to know/read all corresponding parameter values.
    So:
    - where are these values stored (dictionary table)?
    - is there already a FM or a report to read all authoriation values for a certain authorization profile?
    Thanks in advance.
    Best regards,
    Oliver

    Hi,
    check the following it might useful for you:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a92195a9-0b01-0010-909c-f330ea4a585c
    if helpful reward points are appreciated

  • How to get all minimum values for a table of unique records?

    I need to get the list of minimum value records for a table which has the below structure and data
    create table emp (name varchar2(50),org varchar2(50),desig varchar2(50),salary number(10),year number(10));
    insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',3000,2005);
    insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',4000,2007);
    insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',7000,2007);
    insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',7000,2008);
    insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',7000,2010);
    commit;
    SELECT e.name,e.org,e.desig,min(e.year) FROM emp e,(
    SELECT e1.name,e1.org,e1.desig,e1.salary FROM emp e1
    GROUP BY (e1.name,e1.org,e1.desig,e1.salary)
    HAVING COUNT(*) >1) min_query
    WHERE min_query.name = e.name AND min_query.org = e.org AND min_query.desig =e.desig
    AND min_query.salary = e.salary
    group by (e.name,e.org,e.desig);With the above query i can get the least value year where the emp has maximum salary. It will return only one record. But i want to all the records which are minimum compare to the max year value
    Required output
    emp1     org1     mgr     7000     2008
    emp1     org1     mgr     7000     2007Please help me with this..

    Frank,
    Can I write the query like this in case of duplicates?
    Definitely there would have been a better way than the query I've written.
    WITH      got_analytics     AS
         SELECT     name, org, desig, salary, year
         ,     MAX (SALARY)  OVER ( PARTITION BY  NAME, ORG, DESIG)          AS MAX_SALARY
         ,     ROW_NUMBER () OVER ( PARTITION BY  NAME, ORG, DESIG, SALARY
                                    ORDER BY        year  DESC
                           )                              AS YEAR_NUM
           FROM    (SELECT 'emp1' AS NAME, 'org1' AS ORG, 'mgr' AS DESIG, 3000 AS SALARY, 2005 AS YEAR FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',4000,2007 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',4000,2008 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2007 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2007 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2008 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2010 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2010 FROM DUAL)
    SELECT     name, org, desig, salary, year
    FROM     got_analytics
    WHERE     salary          = max_salary
    AND     YEAR_NUM     > 1
    Result:
    emp1     org1     mgr     7000     2010
    emp1     org1     mgr     7000     2008
    emp1     org1     mgr     7000     2007
    emp1     org1     mgr     7000     2007
    WITH      got_analytics     AS
         SELECT     name, org, desig, salary, year
         ,     MAX (SALARY)  OVER ( PARTITION BY  NAME, ORG, DESIG)          AS MAX_SALARY
         ,     ROW_NUMBER () OVER ( PARTITION BY  NAME, ORG, DESIG, SALARY
                                    ORDER BY        year  DESC
                           )                              AS YEAR_NUM
      ,     ROW_NUMBER () OVER ( PARTITION BY  NAME, ORG, DESIG, SALARY, Year
                                    ORDER BY        YEAR  DESC
                           )                              AS year_num2
         FROM    (SELECT 'emp1' AS NAME, 'org1' AS ORG, 'mgr' AS DESIG, 3000 AS SALARY, 2005 AS YEAR FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',4000,2007 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',4000,2008 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2007 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2007 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2008 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2010 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2010 FROM DUAL)
    SELECT     name, org, desig, salary, year
    FROM     got_analytics
    WHERE     salary          = max_salary
    AND     YEAR_NUM     > 1
    AND YEAR_NUM2 < 2
    Result:
    emp1     org1     mgr     7000     2008
    emp1     org1     mgr     7000     2007

  • How to get photos in order for burning to disc !

    Hi, I am new to LR 3 , after downloading photo's from 3 CF cards from a wedding then editing I put chosen
    best shots into a smart collection and all seemed in order numbers wise etc, when I burnt to a disc they are now not in order of the days event, how can I make sure they are of the following : -
    1  - All the same size photo's ready to be printed or put in an album.
    2 - How can I make sure the order in which I see them in the library smart collection is burnt in the
    same order onto a disc, as I have burnt from library and they are all out of order of the wedding event
    when looked at on the disc !!
    Any help would be appreciated ,thanks westyboy1

    You indicated that the images "seemed" to be in the right order.  It might be a good idea to rename the images on export using a custom name/sequence.  If you have done that and the images are still not in order, it's possible that your operating system browsing window is using a different sort order.  I sometimes change windows explorer to sort by file type, and then files are sometimes in what seems be a strange order.

  • How to create production order for multiple items having common raw materia

    Dear all,
    We are running a sheet metal fabrication company at Vadodara Gujrat.
    Please guide us how to create single production order for multiple items using single raw material??
    For example, We want to produce baby shirt(item code AAA001), shirt with full sleeve(item code AAA002), shirt with half sleeve(item code AAA003),shirt slim fit (item code AAA004),shirt loose fit(item code AAA005) from single raw material say(item code XXX001).
    Right now we have to create 5 production order to produce above 5 items of single sales order  in SAP B1 though it is made from single raw material which is foolishness and time consuming too. (Please also note that to produce any finfish good item, raw material required for that item may vary every time in our process.)
    Kindly guide us how to solve the problem.
    Thanks.
    RUPESH  +91-9227744273
    WEB : www.gorasia.co.in

    Hi Rupesh Gorashiya,
    This is possible through MRP for that you have to put Sales Order first and Run MRP Wizard
    MRP Wizard Put Multi Production Order as per Item Taking in Sales Order just click it on and execute.
    Thanks,
    Srujal Patel

  • Production Order for a material without BOM and Routing

    Is it possible to create a production order for a given material without routing and BOM, I know we can
    create a production order for a material without a BOM (with a default routing) just wanted to check with
    the above criteria
    Thanks in Advance!!

    Members:
    Thank you for your valuable replies and time
    Santosh:
    Tried what you have mentioned, but system still picks up a default routing
    Kaushik:
    Maintained Default values in OPJG for the given order type, but system still picks up
    default routing
    Mangalraj:
    have no issue in creating a production order without a BOM, but I am trying to see
    is there a way where I can create a production order without a BOM and routing (not
    even default operation )
    Any suggestions on how to create a production order for a material without a BOM
    and routing (not even default one )

Maybe you are looking for

  • Proper method to fire off some code to create a default set of detail data.

    Greetings, fellow nerds. First, I'd like to thank the folks that have helped me out in the past. I don't always return back to the topic to give kudos, and sometimes I even figure out my problem before anyone says anything. And I try to find referenc

  • LAF Package Table Frame Issues

    I have successfully implemented Francois' LAF package (Thanks very much, Fancois!) and am adapting the functionality to make our forms look more web-like, but I am having a few problems. First, I am having a problem where the table frames (header and

  • Images/gallery web

    hi to all, i need help with web which will be consisted of images (large number/im photographer). im planing to use jquery for but i couldn find solution to my probem, what i need is because large number of photos, for example when i want to update p

  • Trouble with time machine Mac OS X Lion 10.7.5

    help me please, im going nuts. I have successfully manually backed up my macbook pro several times to a G-drive 750.  Usually once every 2-4 weeks. Now when I plug in the G-drive nothing happens (previously, a time machine user page would open, say s

  • NOLOGGING for LOBs

    Oracle 11gR2 rhel5 64bit Hi all, We are trying to figure out a way to reduce the amount of redo that is being generated when we insert data (LOBs) into a table. Our database is in ARCHIVELOG mode and we set the table to NOLOGGING mode also. However,