Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ARBPL from Object ID

Former Member
0 Likes
6,472

Hi,

I want to find the <b>work center(ARBPL)</b> data for a particular Operation number(VORNR) of an order numebr(AUFNR).

The table which I know which has ARBPL field is CRHD.

Can anyone help me out if he knows the tables I should use for getting ARBPL based on above criteria ?

Tushar.

Hi,

I want to find the <b>work center(ARBPL)</b> data for a particular Operation number(VORNR) of an order numebr(AUFNR).

The table which I know which has ARBPL field is CRHD.

Can anyone help me out if he knows the tables I should use for getting ARBPL based on above criteria ?

Tushar.

8 REPLIES 8
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
3,018

Have you tried AFRU? This table ties the confirmations to the production order. VORNR and ARBPL are both in this table.

Regards,

Rich Heilman

Message was edited by: Rich Heilman

Read only

0 Likes
3,018

Hi,

The data element for object ID in AFRU is OBJEKTID and actually I am looking for an Object ID with data element CR_OBJID.

Tushar.

Read only

0 Likes
3,018

Sorry, I mean AFRV.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
3,018

Odd - I did exactly this earlier in the week:


DATA: BEGIN OF arbpl_desc OCCURS 0,
        arbpl_o  LIKE viqmel-arbpl,
        arbpl    LIKE crhd-arbpl,
        werks    LIKE crhd-werks,
        ktext_up LIKE crtx-ktext_up,
      END   OF arbpl_desc.

  LOOP AT notif_int.
    arbpl_desc-arbpl_o = notif_int-arbpl.
    APPEND arbpl_desc.
  ENDLOOP.

  SORT arbpl_desc BY arbpl_o.
  DELETE ADJACENT DUPLICATES FROM arbpl_desc.

  LOOP AT arbpl_desc.
    SELECT SINGLE h~arbpl h~werks t~ktext_up
           FROM   crhd AS h JOIN crtx AS t
             ON   h~objty = t~objty
            AND   h~objid = t~objid
           INTO   (arbpl_desc-arbpl, arbpl_desc-werks,
                   arbpl_desc-ktext_up)
           WHERE  h~objty = 'A'
           AND    h~objid = arbpl_desc-arbpl_o
           AND    t~spras = sy-langu.
    IF sy-subrc <> 0.
      CLEAR: arbpl_desc-arbpl,
             arbpl_desc-werks,
             arbpl_desc-ktext_up.
    ENDIF.
    MODIFY arbpl_desc.
  ENDLOOP.

Rob

Sorry - I thought you already had the object number. Try:


  loop at order_int.
    clear arbpl_desc.
    select  single gewrk
      from  vafiloa
      into  arbpl_desc-arbpl_o
      where aufnr  = order_int-aufnr.
    if sy-subrc = 0.
      append arbpl_desc.
      order_int-gewrk = arbpl_desc-arbpl_o.
      modify order_int.
    endif.
  endloop.

Message was edited by: Rob Burbank

Read only

0 Likes
3,018

Hi Rob,

Can you tell me how and where we define notif_int ?

Tushar.

Read only

0 Likes
3,018

Sorry Tushar - this was just a code snippet from one of my programs. NOTIF_INT is a table of notifications from VIQMEL. It includes the notification number (QMNUM) and work center object number (ARBPL). I think you're more interested in the orders (ORDER_INT) which come from CAUFV and include the order number (AUFNR) and work center object number (GEWRK) which I get from VAFILOA as shown in the code.

Rob

Tushar - did any of this help?

Message was edited by: Rob Burbank

Read only

Former Member
0 Likes
3,018

Hi i am not from this line, but i think i can give small suggestion, ignore it if not suitable

have you tried F1 on that field and then click technical detail, it might show some structure or table,

if it show some structure , copy that structure and paste in se11. then click where used list.

this way you might be able to find what you are looking for

regards

just a try.but not sure

Read only

0 Likes
3,018

Hi Guys,

Thanks for your answers but I solved it myself like this:

Like this we can find OBject ID for querying on ARBPL using AUFNR and VORNR. But we have to use table CRHD, AFKO and most importantly the <b>view called V_QAPO.</b>

SELECT SINGLE CRHD~ARBPL

FROM AFKO

INNER JOIN V_QAPO ON V_QAPOAUFPL = AFKOAUFPL

INNER JOIN CRHD ON CRHDOBJID = V_QAPOARBID

INTO XARBPL

WHERE AFKO~AUFNR = '007200000059'

AND V_QAPO~VORNR = '0010'.