STATUS_TEXT_EDIT,

hi all BW friends ,
what  is the purpose of  STATUS_TEXT_EDIT  ,where should i  provide the objnr   to get the status ,
actually i need objnr to return u the status code..whether complete or outstanding.
any one , kindly explain me in detail  and clearly .
points definitely assinged to all friends
thanks in advance
Sherwin

hi
good
STATUS_READ is used to get the Status of a Production Order
See the code below
  concatenate 'OR' AFKO-AUFNR into L_AUFNR.
  call function 'STATUS_READ'    
    exporting
      OBJNR            = L_AUFNR
      ONLY_ACTIVE      = 'X'
    tables
      STATUS           = IT_JEST
    exceptions
      OBJECT_NOT_FOUND = 1
      others           = 2.
  if SY-SUBRC <> 0.
  endif.
" to get the texts of statuses
  if not IT_JEST[] is initial.
    select ISTAT TXT04
    from TJ02T
    into table IT_TJ02T
    for all entries in IT_JEST
    where ISTAT = IT_JEST-STAT
      and SPRAS = SY-LANGU.
  endif.
reward point if helpful.
thanks
mrutyun^

Similar Messages

  • Error while using STATUS_TEXT_EDIT

    Hi Experts,
    I am using fuctional module STATUS_TEXT_EDIT to change the status of Handling unit number but I am unable to do so
    beacuse the table name which these BAPI used to get object number is JEST  but my object number to corresponding handling unit number are store in table HUSSTAT.
    the error which I am getting is "No status object is available for HUXXXXXXX."
    Please reply ASAP.
    Thanks in advance,
    Gaurav

    Hi,
    For changing the user status you can use this function module.
    STATUS_CHANGE_EXTERN.
    Hope thsi will help.
    Regards,
    Swarna Munukoti.

  • EXTRATOR FOR A MODULE OF FUNCTION STATUS_TEXT_EDIT

    Hi Experts,
    I need to create a DataSource for a module of function STATUS_TEXT_EDIT, but I was a error because I don't have a extraction structure.
    What Can I do to resolve this problem?
    Regards,
    Sérgio Ferreira

    Hi Guys,
    I'd like to know how to create a Extraction Structure for a module function, so as to create the generic datasource?
    Thanks,
    Sérgio Ferreira

  • What is STATUS_TEXT_EDIT function

    What is system status and user status?
    Why this particular function is used?
    What does the import and export parameters signify?

    Hi Sangeeta,
    **What is system status and user status?
    SAP standard <b>system statuses</b> cannot be removed from use.  You cannot override the SAP system status with a user status.  You cannot change the behavior of an SAP system status
      Whereas <b>User Status</b> (or user defined statuses) exist in addition to SAP standard statuses.  User statuses are intended to augment or refine SAP standard statuses, not replace them. 
    There is no limitation to the number of user statuses that can be created.  Both system and user statuses influence business transactions in the same way
    **Why this particular function is used?
    <b>STATUS:</b> A status is an indicator that fulfills two functions. 
    <b>First</b>, it informs you that a particular status has been reached.  For example, an internal order has been created and released; a settlement rule has been entered; a particular business transaction has been executed, etc. 
    <b>Second,</b> it influences the business transactions you can perform for a particular status
    There are SAP standard delivered statuses that apply to all object types.  These are known as <b>SYSTEM STATUSES.</b>  CRTD, REL, SETC, TECO are examples of SAP standard system statuses. 
    **What does the import and export parameters signify?
    <b>Imports</b> or gets  the data objects from the data buffer declared.
    Eg: IMPORT f itab FROM MEMORY
    <b>Export</b> Stores a data cluster in the data buffer .
    The objects declared, obj1 ... objn, are stored as a cluster in the data buffer f. They can be fields, structures, complex structures, or tables.
    Eg: EXPORT obj1 ... objn TO DATA BUFFER f.
    If ur satisfied ,then please close the thread by rewarding appropriate points to the helpful answers.
    Cheers
    Sunny

  • Open Production Order

    Hi have to create a report that has open sales order , open po , open pur req , open planned order and open Production order.
    I need the logic for OPEN PRODUCTION ORDERS.
    The status of the production orders are maintained in JEST Table .
      I need logic to elimate the completed production orders during my selcet . Since JEST Table has multiple entries and for some orders that are released the 'DELV'  status wil not be maintained at all at that time.
    I wil really appreciate your help , if you can tell me how to emliminate the completed production orders during my select query to get the open prod orders.
    Is there any fun moduel or bapi that wil give the Open prod orders ?? or any std report that gives open PO??
    Thanks

    for this you can use the Function STATUS_TEXT_EDIT , for this pass Objnr (get the objnr from AUFK table using the production order) it will give you the status in the LINE exporting parameters.
    Import parameters               Value
    CLIENT                          100
    FLG_USER_STAT
    OBJNR                           QM000200000010
    ONLY_ACTIVE                     X
    SPRAS                           EN
    BYPASS_BUFFER
    Export parameters               Value
    ANW_STAT_EXISTING
    E_STSMA
    LINE                            OSNO NOTE   "this is the status text
    USER_LINE
    STONR                           00
    if line CS 'DELV'
    "ignore the Order
    endif.

  • The STOP statement was used outside a report flow.

    Hi Gurus,
    when i am executing this program it is going to short dump.
    pls help me out.
    thanks in advance.
    Runtime Errors         STOP_NO_REPORT
    Date and Time          06.10.2008 12:10:06
    Short text
    The STOP statement was used outside a report flow.
    What happened?
    Error in the ABAP Application Program
    The current ABAP program "YMRP0003" had to be terminated because it has
    come across a statement that unfortunately cannot be executed.
    What can you do?
    Note down which actions and inputs caused the error.
    To process the problem further, contact you SAP system
    administrator.
    Using Transaction ST22 for ABAP Dump Analysis, you can look
    at and manage termination messages, and you can also
    keep them for a long time.
    Error analysis
    The STOP statement is only useful in specific events of the report
    processing (that is, the execution of a type 1 program). In this case,
    there was no report flow, so the statement could not be executed.
    How to correct the error
    If the error occurred in your own ABAP program or in an SAP
    program you modified, try to remove the error.
    System environment
    SAP-Release 700
    Application server... "ciRDE"
    Network address...... "10.131.28.7"
    Operating system..... "HP-UX"
    Release.............. "B.11.23"
    Hardware type........ "ia64"
    Character length.... 16 Bits
    Pointer length....... 64 Bits
    Work process number.. 3
    Shortdump setting.... "full"
    Database server... "hpx190"
    Database type..... "ORACLE"
    Database name..... "RDE"
    Database user ID.. "SAPDAT"
    Char.set.... "C"
    SAP kernel....... 700
    created (date)... "Apr 21 2008 20:48:34"
    create on........ "HP-UX B.11.23 U ia64"
    Database version. "OCI_102 (10.2.0.1.0) "
    Patch level. 157
    Patch text.. " "
    Database............. "ORACLE 9.2.0.., ORACLE 10.1.0.., ORACLE 10.2.0.."
    SAP database version. 700
    Operating system..... "HP-UX B.11"
    Memory consumption
    Roll.... 16192
    EM...... 8379680
    Heap.... 0
    Page.... 65536
    MM Used. 3492016
    MM Free. 695200
    User and Transaction
    Client.............. 050
    User................ "MBAGGALA"
    Language key........ "E"
    Transaction......... "CC31 "
    Transactions ID..... "48E9EB60C2944602E10000000A831C07"
    Program............. "YMRP0003"
    Screen.............. "SAPMC29C 0020"
    Screen line......... 22
    Information on where terminated
    Termination occurred in the ABAP program "YMRP0003" - in "SCM-MRP-FSE-12_02".
    The main program was "SAPMC29C ".
    In the source code you have the termination point in line 138
    of the (Include) program "YMRP0003".
    Source Code Extract
    Line
    SourceCde
    108
    109
    110
    *This function module read the status of an object
    111
    112
    CALL FUNCTION 'STATUS_TEXT_EDIT'
    113
    EXPORTING
    114
    client           = sy-mandt
    115
    flg_user_stat    = lc_flagx
    116
    objnr            = ls_ecm_data-objnr
    117
    only_active      = lc_flagx
    118
    spras            = sy-langu
    119
    IMPORTING
    120
    line             = lf_sttxt
    121
    user_line        = lf_asttx
    122
    EXCEPTIONS
    123
    object_not_found = 1
    124
    OTHERS           = 2.
    125
    126
    CHECK NOT sy-tcode EQ 'CC32'.
    127
    *-- Begin of Changes made by DGupta1 on 07/12/2006--
    128
    Changes are made to update the Change Number Dates While Calling CC32
    129
    from custom transaction YC06 only
    130
    CHECK NOT sw_yc06 EQ 'X'.
    131
    *-- End of Changes made by DGupta1 on 07/12/2006--
    132
    133
    CHECK NOT lf_sttxt CS 'ECCM' AND NOT lf_sttxt CS 'ECOR'.
    134
    135
    136
    IF ls_ecm_data-datuv NE  lc_maxdate.
    137
    MESSAGE s011.
    >>>>>
       STOP.
    139
    ENDIF.
    140
    141
    142
    IF lf_lastd < lf_artwd.
    143
    MESSAGE s012.
    144
    STOP.
    145
    ENDIF.
    146
    147
    IF ls_ecm_data-lvorm = lc_flagx.
    148
    MESSAGE s013.
    149
    STOP.
    150
    ENDIF.
    151
    152
    WRITE: lf_lastd TO lf_lastd_string.
    153
    WRITE: lf_artwd TO lf_artwd_string.
    154
    155
    156
    IF ls_ecm_data-ccart NE lc_fixd.
    157
    Contents of system fields
    Name
    Val.
    SY-SUBRC
    0
    SY-INDEX
    0
    SY-TABIX
    0
    SY-DBCNT
    1
    SY-FDPOS
    40
    SY-LSIND
    0
    SY-PAGNO
    0
    SY-LINNO
    1
    SY-COLNO
    1
    SY-PFKEY
    ARC0H
    SY-UCOMM
    FCBU
    SY-TITLE
    Create ECR: Object Types
    SY-MSGTY
    S
    SY-MSGID
    YMRP
    SY-MSGNO
    011
    SY-MSGV1
    SY-MSGV2
    SY-MSGV3
    SY-MSGV4
    SY-MODNO
    0
    SY-DATUM
    20081006
    SY-UZEIT
    121006
    SY-XPROG
    SAPCNVE
    SY-XFORM
    CONVERSION_EXIT
    Active Calls/Events
    No.   Ty.          Program                             Include                             Line
    Name
    7 FORM         YMRP0003                            YMRP0003                              138
    SCM-MRP-FSE-12_02
    6 FUNCTION     SAPLXCCA                            ZXCCAU05                               39
    EXIT_SAPMC29C_005
    5 FORM         SAPMC29C                            MC29CFS1_SAVE_USER_EXIT                36
    SAVE_USER_EXIT
    4 FORM         SAPMC29C                            MC29CFF2_FCODE_FCBU_EXECUTE            88
    FCODE_FCBU_EXECUTE
    3 FORM         SAPMC29C                            MC29CFO1_OKCODE_CHECK                 252
    OKCODE_CHECK
    2 MODULE (PAI) SAPMC29C                            MC29CI10_OKCODE                        12
    OKCODE
    1 MODULE (PAI) SAPMC29C                            MC29CI10_DYNPRO_CALL                   11
    DYNPRO_CALL
    Chosen variables
    Name
    Val.
    No.       7 Ty.          FORM
    Name  SCM-MRP-FSE-12_02
    SY-REPID
    YMRP0003
    0000000000000000000000000000000000000000
    0000000000000000000000000000000000000000
    5455333322222222222222222222222222222222
    9D20000300000000000000000000000000000000
    SY-TCODE
    CC31
    00000000000000000000
    00000000000000000000
    44332222222222222222
    33310000000000000000
    SW_YC06
    0
    0
    2
    0
    LF_STTXT
    CRTD
    0000000000000000000000000000000000000000
    0000000000000000000000000000000000000000
    4554222222222222222222222222222222222222
    3244000000000000000000000000000000000000
    SYST-REPID
    YMRP0003
    0000000000000000000000000000000000000000
    0000000000000000000000000000000000000000
    5455333322222222222222222222222222222222
    9D20000300000000000000000000000000000000
    LS_ECM_DATA-DATUV
    20081006
    00000000
    00000000
    33333333
    20081006
    LC_MAXDATE
    29991231
    00000000
    00000000
    33333333
    29991231
    %_PRINT
    000                                                                                0###
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    2222333222222222222222222222222222222222222222222222222222222222222222222222222222222222223000
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    SY-MSGID
    YMRP
    00000000000000000000
    00000000000000000000
    54552222222222222222
    9D200000000000000000
    LC_FLAGX
    X
    0
    0
    5
    8
    SPACE
    0
    0
    2
    0
    SY-MSGNO
    011
    000
    000
    333
    011
    LC_ITEM
    EUR_SCM-PUR-FSE-12_02
    000000000000000000000
    000000000000000000000
    455554425552454233533
    552F33DD052D635D12F02
    SY-MSGV1
    00000000000000000000000000000000000000000000000000
    00000000000000000000000000000000000000000000000000
    22222222222222222222222222222222222222222222222222
    00000000000000000000000000000000000000000000000000
    SY-MSGV2
    00000000000000000000000000000000000000000000000000
    00000000000000000000000000000000000000000000000000
    22222222222222222222222222222222222222222222222222
    00000000000000000000000000000000000000000000000000
    SY-MSGV3
    00000000000000000000000000000000000000000000000000
    00000000000000000000000000000000000000000000000000
    22222222222222222222222222222222222222222222222222
    00000000000000000000000000000000000000000000000000
    SY-MSGV4
    00000000000000000000000000000000000000000000000000
    00000000000000000000000000000000000000000000000000
    22222222222222222222222222222222222222222222222222
    00000000000000000000000000000000000000000000000000
    LF_LASTD
    00000000
    00000000
    00000000
    33333333
    00000000
    LF_ARTWD
    00000000
    00000000
    00000000
    33333333
    00000000
    SY-SUBRC
    0
    0000
    0000
    No.       6 Ty.          FUNCTION
    Name  EXIT_SAPMC29C_005
    ECM_ALT_DATE
    Table IT_665[0x202]
    \FUNCTION=EXIT_SAPMC29C_005\DATA=ECM_ALT_DATE
    Table reference: 113
    TABH+  0(20) = 0000000000000000000000000000000000000000
    TABH+ 20(20) = 000000710000029900000000000000CAFFFFFFFF
    TABH+ 40(16) = 040000DB000006200010249401800000
    store        = 0x0000000000000000
    ext1         = 0x0000000000000000
    shmId        = 0     (0x00000000)
    id           = 113   (0x00000071)
    label        = 665   (0x00000299)
    fill         = 0     (0x00000000)
    leng         = 202   (0x000000CA)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000018
    occu         = 16    (0x00000010)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 2     (cmpSingleMcmpR)
    occu0        = 1
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    isCtfyAble   = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = Not allocated
    pghook       = Not allocated
    idxPtr       = Not allocated
    shmTabhSet   = Not allocated
    id           = Not allocated
    refCount     = Not allocated
    tstRefCount  = Not allocated
    lineAdmin    = Not allocated
    lineAlloc    = Not allocated
    shmVersId    = Not allocated
    shmRefCount  = Not allocated
    shmIsReadOnly = Not allocated
    >>>>> 1st level extension part <<<<<
    regHook      = Not allocated
    collHook     = Not allocated
    ext2         = Not allocated
    >>>>> 2nd level extension part <<<<<
    tabhBack     = Not allocated
    delta_head   = Not allocated
    pb_func      = Not allocated
    pb_handle    = Not allocated
    ECM_DATA
    050            01001020081006            00000000            00000000            dsfasdddffSS
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    3332222222222223333333333333322222222222233333333222222222222333333332222222222226766766666552
    0500000000000000100102008100600000000000000000000000000000000000000000000000000004361344466330
    ECM_EFFECTIVITY
    Table IT_666[0x464]
    \FUNCTION=EXIT_SAPMC29C_005\DATA=ECM_EFFECTIVITY
    Table reference: 126
    TABH+  0(20) = 0000000000000000000000000000000000000000
    TABH+ 20(20) = 0000007E0000029A00000000000001D0FFFFFFFF
    TABH+ 40(16) = 040000DB000006800010249401800000
    store        = 0x0000000000000000
    ext1         = 0x0000000000000000
    shmId        = 0     (0x00000000)
    id           = 126   (0x0000007E)
    label        = 666   (0x0000029A)
    fill         = 0     (0x00000000)
    leng         = 464   (0x000001D0)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000020
    occu         = 16    (0x00000010)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 2     (cmpSingleMcmpR)
    occu0        = 1
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    isCtfyAble   = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = Not allocated
    pghook       = Not allocated
    idxPtr       = Not allocated
    shmTabhSet   = Not allocated
    id           = Not allocated
    refCount     = Not allocated
    tstRefCount  = Not allocated
    lineAdmin    = Not allocated
    lineAlloc    = Not allocated
    shmVersId    = Not allocated
    shmRefCount  = Not allocated
    shmIsReadOnly = Not allocated
    >>>>> 1st level extension part <<<<<
    regHook      = Not allocated
    collHook     = Not allocated
    ext2         = Not allocated
    >>>>> 2nd level extension part <<<<<
    tabhBack     = Not allocated
    delta_head   = Not allocated
    pb_func      = Not allocated
    pb_handle    = Not allocated
    ECM_HIERARCHY
    Table IT_667[0x120]
    \FUNCTION=EXIT_SAPMC29C_005\DATA=ECM_HIERARCHY
    Table reference: 110
    TABH+  0(20) = 0000000000000000000000000000000000000000
    TABH+ 20(20) = 0000006E0000029B0000000000000078FFFFFFFF
    TABH+ 40(16) = 040000DB000006B00010249401800000
    store        = 0x0000000000000000
    ext1         = 0x0000000000000000
    shmId        = 0     (0x00000000)
    id           = 110   (0x0000006E)
    label        = 667   (0x0000029B)
    fill         = 0     (0x00000000)
    leng         = 120   (0x00000078)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000021
    occu         = 16    (0x00000010)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 2     (cmpSingleMcmpR)
    occu0        = 1
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    isCtfyAble   = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = Not allocated
    pghook       = Not allocated
    idxPtr       = Not allocated
    shmTabhSet   = Not allocated
    id           = Not allocated
    refCount     = Not allocated
    tstRefCount  = Not allocated
    lineAdmin    = Not allocated
    lineAlloc    = Not allocated
    shmVersId    = Not allocated
    shmRefCount  = Not allocated
    shmIsReadOnly = Not allocated
    >>>>> 1st level extension part <<<<<
    regHook      = Not allocated
    collHook     = Not allocated
    ext2         = Not allocated
    >>>>> 2nd level extension part <<<<<
    tabhBack     = Not allocated
    delta_head   = Not allocated
    pb_func      = Not allocated
    pb_handle    = Not allocated
    ECM_MNT_VALUE
    0000000000000000
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    2222222222222223333333333333333222222222222222222222222222222222222222222222222222222222222222
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    ECM_OBJMNGREC
    Table IT_668[0x600]
    \FUNCTION=EXIT_SAPMC29C_005\DATA=ECM_OBJMNGREC
    Table reference: 107
    TABH+  0(20) = 0000000000000000000000000000000000000000
    TABH+ 20(20) = 0000006B0000029C0000000000000258FFFFFFFF
    TABH+ 40(16) = 040000DB000005C0001024C401800000
    store        = 0x0000000000000000
    ext1         = 0x0000000000000000
    shmId        = 0     (0x00000000)
    id           = 107   (0x0000006B)
    label        = 668   (0x0000029C)
    fill         = 0     (0x00000000)
    leng         = 600   (0x00000258)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000016
    occu         = 16    (0x00000010)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 8     (cmpManyEq)
    occu0        = 1
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    isCtfyAble   = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = Not allocated
    pghook       = Not allocated
    idxPtr       = Not allocated
    shmTabhSet   = Not allocated
    id           = Not allocated
    refCount     = Not allocated
    tstRefCount  = Not allocated
    lineAdmin    = Not allocated
    lineAlloc    = Not allocated
    shmVersId    = Not allocated
    shmRefCount  = Not allocated
    shmIsReadOnly = Not allocated
    >>>>> 1st level extension part <<<<<
    regHook      = Not allocated
    collHook     = Not allocated
    ext2         = Not allocated
    >>>>> 2nd level extension part <<<<<
    tabhBack     = Not allocated
    delta_head   = Not allocated
    pb_func      = Not allocated
    pb_handle    = Not allocated
    ECM_OBJ_TYPE
    Table IT_669[28x192]
    \FUNCTION=EXIT_SAPMC29C_005\DATA=ECM_OBJ_TYPE
    Table reference: 116
    TABH+  0(20) = C0000009448BF3E0000000000000000000000000
    TABH+ 20(20) = 000000740000029D0000001C000000C0FFFFFFFF
    TABH+ 40(16) = 040000DB000005600010249421800000
    store        = 0xC0000009448BF3E0
    ext1         = 0x0000000000000000
    shmId        = 0     (0x00000000)
    id           = 116   (0x00000074)
    label        = 669   (0x0000029D)
    fill         = 28    (0x0000001C)
    leng         = 192   (0x000000C0)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000014
    occu         = 16    (0x00000010)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 2     (cmpSingleMcmpR)
    occu0        = 1
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 1
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    isCtfyAble   = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = 0xC0000009448B8270
    pgHook       = 0xC0000009448BF440
    idxPtr       = 0x0000000000000000
    shmTabhSet   = 0x0000000000000000
    id           = 195   (0x000000C3)
    refCount     = 1     (0x00000001)
    tstRefCount  = 0     (0x00000000)
    lineAdmin    = 48    (0x00000030)
    lineAlloc    = 48    (0x00000030)
    shmVersId    = 0     (0x00000000)
    shmRefCount  = 2     (0x00000002)
    >>>>> 1st level extension part <<<<<
    regHook      = Not allocated
    collHook     = Not allocated
    ext2         = Not allocated
    >>>>> 2nd level extension part <<<<<
    tabhBack     = Not allocated
    delta_head   = Not allocated
    pb_func      = Not allocated
    pb_handle    = Not allocated
    TRANS_TYP
    H
    0
    0
    4
    8
    D_ASTTX
    0000000000000000000000000000000000000000
    0000000000000000000000000000000000000000
    2222222222222222222222222222222222222222
    0000000000000000000000000000000000000000
    SY-REPID
    SAPLXCCA
    0000000000000000000000000000000000000000
    0000000000000000000000000000000000000000
    5454544422222222222222222222222222222222
    310C833100000000000000000000000000000000
    L_ITEM
    EUR_SCM-MRP-FSE-12_02
    000000000000000000000000000000
    000000000000000000000000000000
    455554424552454233533222222222
    552F33DDD20D635D12F02000000000
    LI_YBS00001
    050EUR_SCM-MRP-FSE-12_02         YMRP0003                                SCM-MRP-FSE-12_02
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    3334555544245524542335332222222225455333322222222222222222222222222222222544245524542335332222
    050552F33DDD20D635D12F020000000009D2000030000000000000000000000000000000033DDD20D635D12F020000
    SY-SUBRC
    0
    0000
    0000
    SYST
    #######################(###############Z################################################XC####
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    000000000000000000000000000000000000000000000000000000000000000000000000000000000000000E000100
    0000000000000000000000020000000000000005000000000100000000000000000000000000010900000001540000
    0000000100000A0000000108010001000000000A0000000000000000000000000000000000000B000008000083000C
    LI_YBS00001-REPORT
    YMRP0003
    0000000000000000000000000000000000000000
    0000000000000000000000000000000000000000
    5455333322222222222222222222222222222222
    9D20000300000000000000000000000000000000
    LI_YBS00001-FORM
    SCM-MRP-FSE-12_02
    000000000000000000000000000000
    000000000000000000000000000000
    544245524542335332222222222222
    33DDD20D635D12F020000000000000
    LS_YBS00001
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    LS_YBS00001-ENABLED
    0
    0
    2
    0
    LS_YBS00001-REPORT
    0000000000000000000000000000000000000000
    0000000000000000000000000000000000000000
    2222222222222222222222222222222222222222
    0000000000000000000000000000000000000000
    LS_YBS00001-FORM
    000000000000000000000000000000
    000000000000000000000000000000
    222222222222222222222222222222
    000000000000000000000000000000
    SYST-REPID
    SAPLXCCA
    0000000000000000000000000000000000000000
    0000000000000000000000000000000000000000
    5454544422222222222222222222222222222222
    310C833100000000000000000000000000000000
    No.       5 Ty.          FORM
    Name  SAVE_USER_EXIT
    RET_CODE
    0
    0000
    0000
    SY-SUBRC
    0
    0000
    0000
    SY-MSGID
    YMRP
    00000000000000000000
    00000000000000000000
    54552222222222222222
    9D200000000000000000
    DARSTAB[]
    Table[initial]
    AEDTB[]
    Table IT_650[0x202]
    \PROGRAM=SAPMC29C\DATA=AEDTB[]
    Table reference: 129
    TABH+  0(20) = 0000000000000000C000000944A25D7000000000
    TABH+ 20(20) = 000000810000028A00000000000000CAFFFFFFFF
    TABH+ 40(16) = 0400000000000EF00010249401800000
    store        = 0x0000000000000000
    ext1         = 0xC000000944A25D70
    shmId        = 0     (0x00000000)
    id           = 129   (0x00000081)
    label        = 650   (0x0000028A)
    fill         = 0     (0x00000000)
    leng         = 202   (0x000000CA)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000065
    occu         = 16    (0x00000010)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 2     (cmpSingleMcmpR)
    occu0        = 1
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    isCtfyAble   = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = Not allocated
    pghook       = Not allocated
    idxPtr       = Not allocated
    shmTabhSet   = Not allocated
    id           = Not allocated
    refCount     = Not allocated
    tstRefCount  = Not allocated
    lineAdmin    = Not allocated
    lineAlloc    = Not allocated
    shmVersId    = Not allocated
    shmRefCount  = Not allocated
    shmIsReadOnly = Not allocated
    >>>>> 1st level extension part <<<<<
    regHook      = 0x0000000000000000
    collHook     = 0x0000000000000000
    ext2         = 0xC000000944AFAD80
    >>>>> 2nd level extension part <<<<<
    tabhBack     = 0xC000000944A23AF0
    delta_head   = 0000000000000000000000000000000000000000000000000000000000000000000000000000000
    pb_func      = 0x0000000000000000
    pb_handle    = 0x0000000000000000
    CC07
    000000000000000000000000000000000000000000000000000000000000000
    000000000000000000000000000000000000000000000000000000000000000
    222222222222222222222222222222222222222222222222222222222222222
    000000000000000000000000000000000000000000000000000000000000000
    AENRB
    050            01001020081006            00000000            00000000            dsfasdddffSS
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    3332222222222223333333333333322222222222233333333222222222222333333332222222222226766766666552
    0500000000000000100102008100600000000000000000000000000000000000000000000000000004361344466330
    DARSTAB
    00000000000000000000000000000000000000000000
    00000000000000000000000000000000000000000000
    22222222222222222222222222222222222222222200
    00000000000000000000000000000000000000000000
    AEEFB[]
    Table IT_651[0x464]
    \PROGRAM=SAPMC29C\DATA=AEEFB[]
    Table reference: 105
    TABH+  0(20) = 0000000000000000C000000944AFADF000000000
    TABH+ 20(20) = 000000690000028B00000000000001D0FFFFFFFF
    TABH+ 40(16) = 0400000000000F500010249401800000
    store        = 0x0000000000000000
    ext1         = 0xC000000944AFADF0
    shmId        = 0     (0x00000000)
    id           = 105   (0x00000069)
    label        = 651   (0x0000028B)
    fill         = 0     (0x00000000)
    leng         = 464   (0x000001D0)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000067
    occu         = 16    (0x00000010)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 2     (cmpSingleMcmpR)
    occu0        = 1
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    isCtfyAble   = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = Not allocated
    pghook       = Not allocated
    idxPtr       = Not allocated
    shmTabhSet   = Not allocated
    id           = Not allocated
    refCount     = Not allocated
    tstRefCount  = Not allocated
    lineAdmin    = Not allocated
    lineAlloc    = Not allocated
    shmVersId    = Not allocated
    shmRefCount  = Not allocated
    shmIsReadOnly = Not allocated
    >>>>> 1st level extension part <<<<<
    regHook      = 0x0000000000000000
    collHook     = 0x0000000000000000
    ext2         = 0xC0000009448F3220
    >>>>> 2nd level extension part <<<<<
    tabhBack     = 0xC00000094482B060
    delta_head   = 0000000000000000000000000000000000000000000000000000000000000000000000000000000
    pb_func      = 0x0000000000000000
    pb_handle    = 0x0000000000000000
    DCTAB[]
    Table IT_35[7x16]
    \PROGRAM=SAPMC29C\DATA=DCTAB[]
    Table reference: 25
    TABH+  0(20) = C000000944921280000000000000000000000000
    TABH+ 20(20) = 00000019000000230000000700000010FFFFFFFF
    TABH+ 40(16) = 0400000000001BB00010249401800000
    store        = 0xC000000944921280
    ext1         = 0x0000000000000000
    shmId        = 0     (0x00000000)
    id           = 25    (0x00000019)
    label        = 35    (0x00000023)
    fill         = 7     (0x00000007)
    leng         = 16    (0x00000010)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000133
    occu         = 16    (0x00000010)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)

    Dear Rajesh!
    Please advise me, what have you done to resolve your problem!!??
    I get next problem when i try to start some transaction:
    Short text                                                                               
    Syntax error in program "SAPLPA_PACKAGE_SERVICES ".                                          
    What happened?                                                                               
    Error in the ABAP Application Program                                                                               
    The current ABAP program "SAPLSFW_COMMON" had to be terminated because it has                
        come across a statement that unfortunately cannot be executed.                                                                               
    The following syntax error occurred in program "SAPLPA_PACKAGE_SERVICES " in                 
         include "LPA_PACKAGE_SERVICES$25 " in                                                       
        line 13:                                                                               
    "The type "TPCHK_FROZEN_OBJECTS_H" is unknown."                                              
    The include has been created and last changed by:                                            
        Created by: "SAP "                                                                               
    Last changed by: "SAP "                                                                      
        Error in the ABAP Application Program                                                                               
    The current ABAP program "SAPLSFW_COMMON" had to be terminated because it has                
        come across a statement that unfortunately cannot be executed.                               
    Error analysis                                                                               
    The following syntax error was found in the program SAPLPA_PACKAGE_SERVICES :                
        "The type "TPCHK_FROZEN_OBJECTS_H" is unknown."                                              
    Trigger Location of Runtime Error                                                                
        Program                                 SAPLSFW_COMMON                                       
        Include                                 LSFW_COMMONU01                                       
        Row                                     117                                                  
        Module type                             (FUNCTION)                                           
        Module Name                             SFW_GET_SWITCHPOS                                    
    Source Code Extract                                                                               
    Line
    SourceCde                                                                               
    87
         IF sy-subrc = 0.                                                                       
       88
           <fs_switchpos>-switch_id  = devc_resultline-switch_id .                              
       89
           <fs_switchpos>-state      = devc_resultline-state .                                  
       90
           <fs_switchpos>-text       = devc_resultline-text .                                   
       91
                                                                                    92
           INSERT <fs_switchpos> INTO TABLE resulttab. "Ergebnis merken                         
       93
           CONTINUE.                                                                               
    94
         ENDIF.                                                                               
    95
                                                                                    96
                                                                                    97
         READ TABLE gt_sfw_package INTO wa_sfw_package WITH TABLE KEY                           
       98
                        devclass = lf_devclass                                                  
       99
                        version  = 'A' .                                                        
      100
                                                                                    101
         IF sy-subrc = 0. "Objekt ist in einem Paket mit Schalter                               
      102
           <fs_switchpos>-switch_id = wa_sfw_package-switch_id .                                
      103
                                                                                    104
         ELSE. "gucken, ob es sich um geschachtelte Pakete handelt                              
      105
                                                                                    106
           DO 20 TIMES.                                                                               
    107
                                                                                    108
             CLEAR wa_superpackage .                                                            
      109
                                                                                    110
             READ TABLE gt_superpackage INTO wa_superpackage WITH TABLE KEY                     
      111
                             devclass = lf_devclass.                                            
      112
                                                                                    113
             IF sy-subrc = 0 .                                                                  
      114
               lf_superpackage = wa_superpackage-parentcl.                                      
      115
             ELSE.                                                                               
    116
                                                                                    >>>>>
               CALL FUNCTION 'PA_GET_SUPER_PACKAGE_NAME'                                        
      118
                 EXPORTING                                                                      
      119
                   i_package_name       = lf_devclass                                           
      120
                   i_direct_select      = 'X'                                                   
      121
                 IMPORTING                                                                      
      122
                   e_super_package_name = lf_superpackage.                                      
      123
                                                                                    124
                                                                                    125
               wa_superpackage-devclass = lf_devclass .                                         
      126
               wa_superpackage-parentcl = lf_superpackage .                                     
      127
               INSERT wa_superpackage INTO TABLE gt_superpackage .                              
      128
                                                                                    129
             ENDIF.                                                                               
    130
                                                                                    131
             IF lf_superpackage = space .                                                       
      132
               <fs_switchpos>-state     = space .                                               
      133
               <fs_switchpos>-switch_id = space .                                               
      134
               EXIT. "Enstation !                                                               
      135
             ELSE .                                                                               
    136

  • ALV Report - Production Scheduling Report

    Hello Gurus,
    I need to write an ALV report of open production order operations per selection criteria.  If the production orders are linked to any sales order, then the result of ALV should also contain the sales order data.
    Selection screen should contain -
    Plant(required), Production order number(optional), Material number (optional), Work center (optional).
    If the system statuses of the production orders are not TECO, CLSD, DV then they are considered as open.
    The ALV report should contain the following fields.
    SO Number, PO Nbr, Ship-to-address, Material availability date, Req ship date, Last confirmed date, Ship via, Sales order line item, Pro Ord Nr, Plant, Pro ord cre date, Material Nbr, Material desc, Order qty, UOM, Sch Start date, Sche finish date, user status, MRP ctrler, Remaining hrs etc.
    Please guide me how to proceed to achieve the required report.
    Regards,
    B

    Why can't you proceed with your previous thread,,
    Re: Production Order Statuses - Open production orders
    call function 'STATUS_TEXT_EDIT'.
    exporting
       objnr     = w_objnr
    importing
       line       = line
    if line CS 'TECO' or
      line CS 'CLSD' or
      line CS 'DV'.
    " closed orders
    else.
    "open orders
    endif.

  • Production Order Statuses - Open production orders

    Hello Gurus,
    I need to extract all the open production orders whose statuses are not DLV. help me out how I can do this. I dont know from which table I can extract this data.
    I know the tables related are -
    AUFK prd ord master data
    AFKO prd ord header
    AFPO prd ord details
    But I dont see the status field in any of these tables.
    Regards,
    B

    Vijay,
    Can u check if my code is correct.
    TABLES : AUFK, JEST.
    DATA  : BEGIN OF IT OCCURS 0,
            AUFNR LIKE AUFK-AUFNR,
            AUART LIKE AUFK-AUART,
            OBJNR LIKE AUFK-OBJNR,
            STAT  LIKE JEST-STAT,
            LINE  TYPE BSVX-STTXT,
            END OF IT.
    LOOP AT IT.
    SELECT AUFNR OBJNR FROM AUFK INTO IT WHERE AUART = 'PP01'.
    CALL FUNCTION 'STATUS_TEXT_EDIT'
      EXPORTING
       CLIENT                  = SY-MANDT
      FLG_USER_STAT           = ' '
        OBJNR                   = IT-OBJNR
      ONLY_ACTIVE             = 'X'
        SPRAS                   = 'E'
      BYPASS_BUFFER           = ' '
    IMPORTING
      ANW_STAT_EXISTING       =
      E_STSMA                 =
        LINE                    = IT-LINE
      USER_LINE               =
      STONR                   =
    EXCEPTIONS
      OBJECT_NOT_FOUND        = 1
      OTHERS                  = 2
    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 IT-LINE = 'DLV'.
    APPEND IT.
    ENDIF.
    ENDSELECT.
    ENDLOOP.
    WRITE /: IT-AUFNR.
    Regards,
    B

  • Aubtotal in ALV Report

    Dear All,
    I have a report which is working fine.
    Now I want to add the subtotal feature.
    If I sort the material column, the quantity of that material should get added.
    I tries to use LS_FIELDCAT-DO_SUM = 'X'. but problem is not solved.
    Please help.
    Points be awarded for all replies.
    regards,

    I tried but not workig.
    Can I request you to have a look at my code?
    ====================
    *& Report  ZWM_STOCK_REPORT
    Program Name          : ZWM_STOCK_REPORT
    Type / Module          : Report/WM
    Created by          : Sachin Dabhade
    Created on            : 12.01.2008
    Requestor          : Harish S S
    CRF No.          : NA
    Comments: purpose, use, design, structure, testing hints, etc
                          Modification Log:     
    *CRF No.     
    *Date          ABAPer       Functional Consultant       Description
    REPORT  ZWM_STOCK_REPORT.
    TABLES : EQUI, ZWMSERIALNO.
    TYPE-POOLS: SLIS.
    data : lv_file type string.
    data : CT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV with header line.
    *DATA : CT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    data : begin of itab_final occurs 0,
            qty(10),
           end of itab_final.
    data : lt_sort TYPE slis_t_sortinfo_alv,
           ls_sort TYPE slis_sortinfo_alv.
    ALV data declarations
      data: it_sortcat   type slis_sortinfo_alv occurs 1,
            wa_sort like line of it_sortcat.
    DATA : GS_LAYOUT TYPE SLIS_LAYOUT_ALV,
           GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
           LT_CAT TYPE SLIS_T_FIELDCAT_ALV,
           HEADING  TYPE SLIS_T_LISTHEADER,
           GT_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER,
           G_EXTAB TYPE  SLIS_T_EXTAB,
           GT_EVENTS      TYPE SLIS_T_EVENT,
           GT_SORT TYPE SLIS_T_SORTINFO_ALV,
           GT_LAYOUT TYPE SLIS_LAYOUT_ALV,
           G_REPID LIKE SY-REPID,
           G_SAVE,
           GS_VARIANT LIKE DISVARIANT.
    *data: it_fieldcat type slis_fieldcat_alv occurs 0,
         GS_REPID TYPE SY-REPID,
         GS_LAYOUT TYPE SLIS_LAYOUT_ALV.
    *it_fieldcat-fieldname = 'Tex'.
    *it_fieldcat-tabname   = 'ABC'.
    DATA  : BEGIN OF I_FINAL OCCURS 0,
            MATNR LIKE  MARD-MATNR , "(Material Number),
            MAKTX LIKE  MAKT-MAKTX , "(Material Desciption),
            EQUNR LIKE  EQUI-EQUNR, "( Serial Nunmber),
            ERDAT LIKE  EQUI-ERDAT,  "( Created on)
            STORAGEBIN LIKE ZWMSERIALNO-STORAGEBIN, "(Storage Bin),
            CHASSIS(30),
            ENGINE(30),
            GEARBOX(30),
            QTY(2) type n,
            END OF I_FINAL.
    DATA: BEGIN OF I_MARA OCCURS 0,
    MATNR LIKE MARA-MATNR,
    MTART LIKE MARA-MTART,
    END OF I_MARA.
    DATA : BEGIN OF I_EQUI OCCURS 0,
            EQUNR LIKE EQUI-EQUNR,
             OBJNR LIKE EQUI-OBJNR ,
             MATNR LIKE EQUI-MATNR,
             SERNR LIKE EQUI-SERNR,
             ERDAT LIKE EQUI-ERDAT,
           END OF I_EQUI.
    DATA : BEGIN OF I_EQUI2 OCCURS 0,
            EQUNR LIKE AUSP-OBJEK,
             OBJNR LIKE EQUI-OBJNR ,
             MATNR LIKE EQUI-MATNR,
             SERNR LIKE EQUI-SERNR,
             ERDAT LIKE EQUI-ERDAT,
           END OF I_EQUI2.
    ***DATA: BEGIN OF i_ser03 OCCURS 0,
            lief_nr LIKE ser01-lief_nr,
            obknr  LIKE ser01-obknr,
         END OF i_ser03.
    ***DATA: BEGIN OF i_objk OCCURS 0,
           obknr LIKE objk-obknr,
           equnr  LIKE objk-equnr,
           atwrt LIKE ausp-atinn,
         END OF i_objk.
    DATA: BEGIN OF I_MAKT OCCURS 0,
            MATNR LIKE MAKT-MATNR,
            MAKTX LIKE MAKT-MAKTX,
          END OF I_MAKT.
    DATA : BEGIN OF I_MARD OCCURS 0,
              MATNR LIKE MARD-MATNR,
              WERKS LIKE MARD-WERKS,
              LGORT LIKE MARD-LGORT,
              LABST LIKE MARD-LABST,
           END OF I_MARD.
    DATA : BEGIN OF I_ZWMSERIAL OCCURS 0,
           SERIALNO LIKE ZWMSERIALNO-SERIALNO,
           STORAGEBIN LIKE ZWMSERIALNO-STORAGEBIN,
           END OF I_ZWMSERIAL.
      DEFINE M_SORT.
        ADD 1 TO LS_SORT-SPOS.
        LS_SORT-FIELDNAME = &1.
        LS_SORT-UP = 'X'.
        LS_SORT-SUBTOT = &2.
        APPEND LS_SORT TO LT_SORT.
      END-OF-DEFINITION.
    ***DATA: BEGIN OF i_ausp OCCURS 0,
           objek LIKE ausp-objek,
           atinn LIKE ausp-atinn,
           atwrt LIKE ausp-atwrt,
         END OF i_ausp.
    ***DATA: BEGIN OF i_cabn OCCURS 0,
           atinn LIKE cabn-atinn,
           atnam LIKE cabn-atnam,
         END OF i_cabn.
    ***Data : wa_equi like i_equi,
          wa_ser03 like i_ser03,
          wa_objk like i_objk,
          wa_makt like i_makt,
          wa_mard like i_mard,
          wa_zwmserial like i_zwmserial,
          wa_ausp like i_mard,
          wa_cabn like i_cabn,
          wa_final like i_final.
    **data : p_file type string.
    DATA: GV_LINES TYPE I.
    DATA : BEGIN OF  ITAB_AUSP OCCURS 0,
    OBJEK LIKE AUSP-OBJEK,
    ATINN LIKE AUSP-ATINN,
    ATWRT LIKE AUSP-ATWRT,
    END OF ITAB_AUSP.
    DATA  : internal_no like ausp-ATINN.
    Selection Screen **************
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-800.
    PARAMETERS : P_WERKS LIKE MARD-WERKS .
    PARAMETERS : P_LGORT LIKE MARD-LGORT.
    SELECTION-SCREEN END OF BLOCK B1.
    End Of Selection Screen*********
    **START OF SELECTION EVENT ..................
    START-OF-SELECTION.
      PERFORM GET_STOCK_DETAILS TABLES I_FINAL[].
      PERFORM ALV.
    **perform display_records.
    end of selection*****************
    END-OF-SELECTION.
      DESCRIBE TABLE I_FINAL LINES GV_LINES.
      IF GV_LINES GT 0.
        WRITE : / 'Number of records transferred to file :', 50 GV_LINES.
      ELSE.
        WRITE : / 'No records selected for the given input'.
      ENDIF.
    *&      Form  get_stock_details
          text
         -->P_I_FINAL[]  text
    FORM GET_STOCK_DETAILS  TABLES   PI_FINAL LIKE I_FINAL[].
      SELECT MATNR WERKS LGORT LABST INTO TABLE I_MARD FROM MARD WHERE
                                                           WERKS = P_WERKS  AND
                                                           LGORT = P_LGORT AND
                                                           LABST > 0.
      IF NOT I_MARD[] IS INITIAL.
        SELECT MATNR MTART FROM MARA INTO TABLE I_MARA FOR ALL ENTRIES IN I_MARD WHERE MATNR = I_MARD-MATNR  AND MTART = 'FERT'.
      ENDIF.
      IF NOT I_MARA[] IS INITIAL.
        SELECT  MATNR                                            " Fetching Description : Maktx
                MAKTX
                FROM MAKT
                INTO  TABLE I_MAKT
                FOR ALL ENTRIES IN I_MARA
                WHERE MATNR = I_MARA-MATNR.
        SELECT  EQUNR OBJNR MATNR SERNR ERDAT
                FROM EQUI
                INTO  TABLE I_EQUI2
                FOR ALL ENTRIES IN I_MARA
                WHERE MATNR = I_MARA-MATNR.
        IF NOT I_EQUI2[] IS INITIAL.
          SELECT OBJEK ATINN ATWRT FROM AUSP INTO TABLE ITAB_AUSP FOR ALL ENTRIES IN I_EQUI2 WHERE OBJEK = I_EQUI2-EQUNR.
          LOOP AT I_EQUI2.
            DATA : ULINE LIKE BSVX-STTXT.
            CALL FUNCTION 'STATUS_TEXT_EDIT'
              EXPORTING
                FLG_USER_STAT = 'X'
                OBJNR         = I_EQUI2-OBJNR
                ONLY_ACTIVE   = 'X'
                SPRAS         = 'E'
              IMPORTING
                USER_LINE     = ULINE.
            IF SY-SUBRC = 0.
              IF ULINE = 'SFLT'.
                I_EQUI-EQUNR = I_EQUI2-EQUNR.
                I_EQUI-OBJNR = I_EQUI2-OBJNR.
                I_EQUI-MATNR = I_EQUI2-MATNR.
                I_EQUI-SERNR = I_EQUI2-SERNR.
                I_EQUI-ERDAT = I_EQUI2-ERDAT.
                APPEND I_EQUI.
                CLEAR I_EQUI.
              ENDIF.
            ENDIF.
          ENDLOOP.
        Data : equnr(17) type c.
        equnr = i_equi-equnr.
          SELECT SERIALNO STORAGEBIN FROM ZWMSERIALNO
                                          INTO TABLE I_ZWMSERIAL
                                          FOR ALL ENTRIES IN I_EQUI
                                          WHERE SERIALNO = I_EQUI-EQUNR+0(17).
        ENDIF.
      ENDIF.
      LOOP AT I_EQUI.
        I_FINAL-MATNR = I_EQUI-MATNR.
        I_FINAL-EQUNR = I_EQUI-EQUNR.
        I_FINAL-ERDAT = I_EQUI-ERDAT.
        READ TABLE I_MAKT WITH KEY MATNR = I_EQUI-MATNR.
        IF SY-SUBRC = 0.
          I_FINAL-MAKTX = I_MAKT-MAKTX.
        ENDIF.
        READ TABLE I_ZWMSERIAL WITH KEY SERIALNO = I_EQUI-EQUNR.
        IF SY-SUBRC = 0.
          I_FINAL-STORAGEBIN = I_ZWMSERIAL-STORAGEBIN.
        ENDIF.
        CALL FUNCTION 'CONVERSION_EXIT_ATINN_INPUT'
          EXPORTING
            INPUT         = 'CHASISNUMBER'
         IMPORTING
           OUTPUT        = internal_no.
        READ TABLE ITAB_AUSP WITH KEY OBJEK = I_EQUI-EQUNR ATINN = internal_no.
        IF SY-SUBRC = 0.
          I_FINAL-CHASSIS = ITAB_AUSP-ATWRT.
        ENDIF.
        CALL FUNCTION 'CONVERSION_EXIT_ATINN_INPUT'
          EXPORTING
            INPUT         = 'ENGINE_NUMBER'
         IMPORTING
           OUTPUT        = internal_no.
        READ TABLE ITAB_AUSP WITH KEY OBJEK = I_EQUI-EQUNR ATINN = internal_no .
        IF SY-SUBRC = 0.
          I_FINAL-ENGINE = ITAB_AUSP-ATWRT.
        ENDIF.
        CALL FUNCTION 'CONVERSION_EXIT_ATINN_INPUT'
          EXPORTING
            INPUT         = 'GEARBOXNUMBER'
         IMPORTING
           OUTPUT        = internal_no.
        READ TABLE ITAB_AUSP WITH KEY OBJEK = I_EQUI-EQUNR ATINN = internal_no. .
        IF SY-SUBRC = 0.
          I_FINAL-GEARBOX = ITAB_AUSP-ATWRT.
        ENDIF.
        i_final-qty = '1'.
        APPEND I_FINAL.
        CLEAR I_FINAL.
      ENDLOOP.
    ENDFORM.                    " get_stock_details
    *&      Form  FIELD_INITIALISATION
          text
    -->  p1        text
    <--  p2        text
    FORM FIELD_INITIALISATION USING    P_GT_FIELDCAT TYPE
    SLIS_T_FIELDCAT_ALV.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         I_STRUCTURE_NAME = 'i_final'
       CHANGING
         CT_FIELDCAT      = GT_FIELDCAT[].
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
      DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
      lt_sort TYPE slis_t_sortinfo_alv,
      ls_sort TYPE slis_sortinfo_alv.
    gs_layout-cell_merge = 'X'.
      LS_FIELDCAT-FIELDNAME = 'MATNR'.
      LS_FIELDCAT-COL_POS = 1.
      LS_FIELDCAT-TABNAME   =  'i_final'.
      LS_FIELDCAT-OUTPUTLEN = '18'.
      LS_FIELDCAT-SELTEXT_L = 'Material'.
      APPEND LS_FIELDCAT TO GT_FIELDCAT.
      CLEAR: LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME = 'MAKTX'.
      LS_FIELDCAT-COL_POS = 2.
      LS_FIELDCAT-TABNAME   =  'i_final'.
      LS_FIELDCAT-OUTPUTLEN = '40'.
      LS_FIELDCAT-SELTEXT_L = 'Material Description'.
      APPEND LS_FIELDCAT TO GT_FIELDCAT.
      CLEAR: LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME = 'EQUNR'.
      LS_FIELDCAT-COL_POS = 3.
      LS_FIELDCAT-TABNAME   =  'i_final'.
      LS_FIELDCAT-OUTPUTLEN = '18'.
      LS_FIELDCAT-SELTEXT_L = 'Serial Number'.
      APPEND LS_FIELDCAT TO GT_FIELDCAT.
      CLEAR: LS_FIELDCAT.
    DEFINE m_sort.
    add 1 to ls_sort-spos.
    ls_sort-fieldname = 'QTY'.
    ls_sort-up = 'X'.
    ls_sort-subtot = &2.
    append ls_sort to lt_sort.
    END-OF-DEFINITION.
      LS_FIELDCAT-FIELDNAME = 'QTY'.
      LS_FIELDCAT-COL_POS = 4.
      LS_FIELDCAT-TABNAME   =  'i_final'.
      LS_FIELDCAT-OUTPUTLEN = '18'.
      LS_FIELDCAT-SELTEXT_L = 'QTY'.
      LS_FIELDCAT-DO_SUM = 'X'.
      APPEND LS_FIELDCAT TO GT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME = 'CHASSIS'.
      LS_FIELDCAT-COL_POS = 5.
      LS_FIELDCAT-TABNAME   =  'i_final'.
      LS_FIELDCAT-OUTPUTLEN = '18'.
      LS_FIELDCAT-SELTEXT_L = 'Chasis Number'.
      APPEND LS_FIELDCAT TO GT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME = 'ENGINE'.
      LS_FIELDCAT-COL_POS = 6.
      LS_FIELDCAT-TABNAME   =  'i_final'.
      LS_FIELDCAT-OUTPUTLEN = '18'.
      LS_FIELDCAT-SELTEXT_L = 'Engine Number'.
      APPEND LS_FIELDCAT TO GT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME = 'GEARBOX'.
      LS_FIELDCAT-COL_POS = 7.
      LS_FIELDCAT-TABNAME   =  'i_final'.
      LS_FIELDCAT-OUTPUTLEN = '18'.
      LS_FIELDCAT-SELTEXT_L = 'Gear Box'.
      APPEND LS_FIELDCAT TO GT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME = 'STORAGEBIN'.
      LS_FIELDCAT-COL_POS = 8.
      LS_FIELDCAT-TABNAME   =  'i_final'.
      LS_FIELDCAT-OUTPUTLEN = '18'.
      LS_FIELDCAT-SELTEXT_L = 'Storage Bin'.
      APPEND LS_FIELDCAT TO GT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME = 'ERDAT'.
      LS_FIELDCAT-COL_POS = 9.
      LS_FIELDCAT-TABNAME   =  'i_final'.
      LS_FIELDCAT-OUTPUTLEN = '18'.
      LS_FIELDCAT-SELTEXT_L = 'Production Date'.
      APPEND LS_FIELDCAT TO GT_FIELDCAT.
      CLEAR LS_FIELDCAT.
    ENDFORM.                    " FIELD_INITIALISATION
    *&      Form  ALV
          text
    -->  p1        text
    <--  p2        text
    FORM ALV .
    *m_sort 'QTY' 'X'.
    gs_layout-cell_merge = 'X'.
      PERFORM FIELD_INITIALISATION USING GT_FIELDCAT[].
      G_REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
        I_CALLBACK_PROGRAM                = G_REPID
        I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
         IS_LAYOUT                         = GS_LAYOUT
         IT_FIELDCAT                       = GT_FIELDCAT
         it_sort                           = it_sortcat
         I_SAVE                           = 'A'
       TABLES
          T_OUTTAB                          = I_FINAL
    EXCEPTIONS
       PROGRAM_ERROR                     = 1
       OTHERS                            = 2
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    write :/ 'Hello'.
    ENDFORM.                    " ALV
    *&      Form  build_sortcat
          Build Sort catalog
    FORM build_sortcat .
      wa_sort-spos      = 1.
      wa_sort-fieldname = 'QTY'.
      wa_sort-SUBTOT    = 'X'. "subtotals any totals column by this field
    gd_sortcat-tabname
      APPEND wa_sort TO it_sortcat.
    wa_sort-spos      = 2.
    wa_sort-fieldname = 'EBELP'.
    gd_sortcat-tabname
    APPEND wa_sort TO it_sortcat.
    ENDFORM.
    ====================

  • System Status at WBS level

    Hi friends.
             I have an issue in my report, my requirement is I have to fetch all the WBS Elements which are having System status as TECO . But in the selection screen i have given date range. Now i have to fetch all the WBS  having TECO as system status with in this date range . I have used JEST table also for checking this status .I have used  prps table for wbs elements.
    when i give the date range i am not getting all the wbs with in tht range.
    how can i validate date in this case.
    Is there any table which gives system status based on date .
    i want table with system status and date.
    please have a look over this .

    Hi,
       Try the fm STATUS_TEXT_EDIT.
    Regards
    Kiran Sure

  • Notification Status at Run time in Notif_event_post

    Hi All,
    My requirement is to send a mail to the creator of the notification when their is a change in the notification status and that changed notification status has been saved by the user.
    To achieve the functionality i am using Notif_Event_Post and in this at run time i am getting the new work order but i am not able to get the new notification status at run time that the user is going save.
    When i use select query on jest and tj02 using OBJNR and ISTAT i am getting the old notification status not the new notification status.
    I also tried using the STATUS_TEXT_EDIT and STATUS_TEXT_Multi but the output is same as above.
    Please give solution to the above problem.
    Thanks in Advance.

    Hey Shiva,
    The FM for finding user status is CRM_STATUS_READ_OW
    Please Reward for usefull usefull post..
    Regards,
    Anand..

  • Equipment no longer exists in EQUI but found in EQUZ, EQKT tables

    Hi Experts,
    We found that the few equipments are no longer exists in EQUI, but left with the entries in the tables EQUZ, EQKT.Also, we found that we could able to read the system and user status for these equipments in the JEST table and STATUS_TEXT_EDIT Function module where it is showing the status as 'INST'
    We ran the report RISTEQ20 and got the message as ' Root segment not found'. We could understand that some how the inconsistencies occured. Also, we have confirmed these equipments listed out after we ran the report RCCLZUOB with class type 002 in the test mode.
    To remove these inconsistencies, Before we run the report RCCLZUOB in the update mode (Delete =X), we would like to know how this would have happened.No users in the production got training to the archiving process or deletion process.
    Can you please throw some hints for us to understand the problem completely.
    Thanks,
    Suresh
    Edited by: Suresh Babu on Jun 24, 2011 2:10 AM

    Hi Pete,
    Thanks for the reply. We havent assign any serial number profile for this particular category of equipment. Also We havent done any archving or put a deletion flag. We could read the status of these equipments still as 'INST' in JEST table.
    Thanks,
    Suresh

  • EXIT/ BADI/ Enhancement point for User Status change in Order

    Hi all,
    I am looking for an EXIT or a BADI or an enhancement point specifically for user status change in an order thru IW31/IW32.
    I have the exit names for Order PBO, PAI, 'SAVE' event etc. so m not looking for generic answers.
    I have to put some validations for the Order on USER STATUS CHANGE. Let me know if any of u have any pointers on that.
    Thanks and Regards,
    Sonal

    Hi,
    Use this Enhancement IWO10009 and call these function module to change the User Status
    STATUS_TEXT_EDIT --> To Read the existing status.
    STATUS_CHANGE_INTERN_VB --> to change the status.
    Regards,
    Satish

  • 'Missing parameter with PERFORM' error with a function IN BACKGROUND TASK

    I am getting this error when calling a custom function in MIGO user exit ZXMBCU01.  When I remove the 'IN BACKGROUND TASK' the function works fine and there are no error messages.  When using 'IN BACK...' you can't debug within it to see where the message comes from.  I see the message with SM58.  I am working in an sap 4.7 environment.  I have not found any solutions from google searches.
    Here is the statement within ZXMBCU01:
        CALL FUNCTION 'Z_UPDATE_MATERIAL_AVAIL_STATUS' IN BACKGROUND TASK
          EXPORTING
            work_order = xmseg-aufnr.
    Here is the code for the function:
    FUNCTION Z_UPDATE_MATERIAL_AVAIL_STATUS.
    ""Update function module:
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(WORK_ORDER) LIKE  AUFK-AUFNR DEFAULT '0000000000'
    TABLES: eban, resb, aufk.
    -Global Types----
    TYPES: BEGIN OF t_data,
           rsnum TYPE resb-rsnum,
           rspos TYPE resb-rspos,
           aufnr TYPE resb-aufnr,          "Order Number
           bdmng TYPE resb-bdmng,          "Requirement Quantity
           enmng TYPE resb-enmng,          "Quantity withdrawn
           bsmng TYPE eban-bsmng,          "Quantity ordered against this purchase requisition
           END OF t_data.
    DATA:  gt_data TYPE t_data OCCURS 0,
           ga_data TYPE t_data.
    -Global Variables----
    DATA: gv_refused TYPE BAPIFLAG-BAPIFLAG,
          gs_caufvd  TYPE caufvd,
          g_text TYPE t100-text,
          gv_objnr LIKE aufk-objnr,
          gv_status LIKE  bsvx-sttxt,
          gv_trig_stat TYPE c.
    TABLES RETURNED FROM BAPI
    DATA:  BEGIN OF xreturn OCCURS 0.
            INCLUDE STRUCTURE bapiret2.
    DATA:  END OF xreturn.
      SELECT SINGLE objnr FROM aufk
         INTO gv_objnr
         WHERE  aufnr = work_order.
      CALL FUNCTION 'STATUS_TEXT_EDIT'
        EXPORTING
          flg_user_stat = 'X'
          objnr         = gv_objnr
          only_active   = 'X'
          spras         = sy-langu
        IMPORTING
          line          = gv_status.
      IF ( gv_status CS 'REL' ) AND
         ( gv_status NS 'NMAT' AND gv_status NS 'CNF' AND gv_status NS 'CLSD' AND
           gv_status NS 'TECO' AND gv_status NS 'DLFL' ).
        SELECT SINGLE *
          FROM AUFK
         WHERE aufnr = work_order AND
               ( auart = 'PM01' OR
                 auart = 'PM02' OR
                 auart = 'PM03' OR
                 auart = 'PM99' ).
        IF sy-subrc = 0.
          SELECT resbrsnum resbrspos resbaufnr resbbdmng resbenmng ebanbsmng
            INTO CORRESPONDING FIELDS OF ga_data
            FROM resb LEFT JOIN eban
              ON resbrsnum = ebanarsnr AND
                 resbrspos = ebanarsps
           WHERE resb~aufnr = work_order AND
                 resb~bdmng > 0.
        SELECT rsnum rspos aufnr bdmng enmng
          INTO CORRESPONDING FIELDS OF ga_data
          FROM resb
         WHERE aufnr = work_order
           AND bdmng > 0.
              SELECT SINGLE bsmng
                INTO ga_data-bsmng
                FROM eban
               WHERE arsnr = ga_data-rsnum
                 AND arsps = ga_data-rspos.
              IF sy-subrc <> 0.
                CLEAR ga_data-bsmng.
              ENDIF.
               IF ga_data-bdmng = ga_data-enmng OR
                  ga_data-bdmng = ga_data-bsmng.
                 "update status - but all items must pass
               ELSE.
                 gv_trig_stat = 'N'.
                 EXIT. "status won't change so get out now
               ENDIF.
         ENDSELECT.
       IF ga_data~bdmng > 0.
           IF ga_data-bdmng = ga_data-enmng OR
              ga_data-bdmng = ga_data-bsmng.
         IF gv_trig_stat <> 'N'.
              CALL FUNCTION 'CO_IH_USERSTATUS_SET'
                EXPORTING
                  I_AUFNR              = ga_data-aufnr    "'000005000263'
                  I_USR_STAT_INT       = 'E0002'
      I_USR_STAT_EXT       =
      I_SET_INACTIVE       =
      I_BUF_READ           =
                  I_SPRAS              = sy-langu
                IMPORTING
                  E_CHNG_REFUSED       = gv_refused
                  E_CAUFVD             = gs_caufvd
                TABLES
                  RETURN               = xreturn.
              LOOP AT xreturn
               WHERE type = 'E'.
              ENDLOOP.
              IF sy-subrc <> 0.
                CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
                RETURN.
              ELSE.
                READ TABLE xreturn INDEX 1.
                CALL FUNCTION 'PI_BP_GET_MESSAGE_TEXT'
                  EXPORTING
                    iv_message_id     = xreturn-id
                    iv_message_type   = xreturn-type
                    iv_message_number = xreturn-number
                    iv_message_v1     = xreturn-message_v1
                    iv_message_v2     = xreturn-message_v2
                    iv_message_v3     = xreturn-message_v3
                    iv_message_v4     = xreturn-message_v4
                  IMPORTING
                    ev_message_text   = g_text.
              ENDIF.
         ENDIF.
         ENDIF.
           ENDIF.
         ENDSELECT.
        ENDIF.
      ENDIF.
    ENDFUNCTION.
    Does anyone have any ideas?  Thank you very much in advance.
    Glenn Allen
    Software Architect (specializing in SAP)

    I'd be starting a process of elimination... perhaps start with an "exit." right after
    SELECT SINGLE objnr
      FROM aufk
      INTO gv_objnr
      WHERE aufnr = work_order.
    exit.  "leave FM NOW
    and if that doesn't crash, work down the code down the code in the function e.g. comment out the BAPI_commit call... and / or build a little test harness report to call the Z function in background task... btw, does the ST22 dump point to anything more specific...?

  • Urgent : Relation b/w PROJ ,JEST ,JSTO.... tables?

    Hi Guys,
                  I am using these tables PROJ , JSTO , JEST , TJ30 , TJ30T and TJ02T.can anybody tell me how they are Related.I mean Primary Key Freign key Relationship.
                       In my program i have to download the data from these table based on Created date and Last Updatetd Date .Except PROJ table other tables are not having any date field. So how to download the data based on PROJ Table for all the other tables?
                              Very Very Urgent.Full points will be given for correct Answer.
    Thanks,
    Gopi.

    Hello Gopi,
    Please select the field OBJNR from PROJ table for a project not delete status.
    Than select all the active user/system status for that project. Active and Inactive status you will find from the FM STATUS_READ and STATUS_TEXT_EDIT
            SELECT SINGLE * FROM JSTO CLIENT SPECIFIED
                                      WHERE MANDT = MANDT
                                            AND   OBJNR = OBJNR.
            SELECT * FROM JEST CLIENT SPECIFIED
                               APPENDING TABLE JEST_TAB
                               WHERE MANDT = MANDT
                                      AND   OBJNR = OBJNR.
    Please let me know your exact requirement, so that I may help you in better way.
    Regards,
    A.Singh

Maybe you are looking for

  • Open Link in New Window not working

    Using iWeb 08, I create a new entry on my blog/news page, highlight the text, go to the link tab, paste in a website, make sure 'Link to an External Page' is selected, and put a tick in 'Open Link in New Window'. When published it opens in the same w

  • Is it possible to restrict the user from creating a sibling and allow him to ONLY create child nodes in DRM?

    When in a hierarchy, a user right clicks on a node to crate a new node, he has two options -Child -Sibling Is it possible to restrict the user from creating a sibling and allow him to ONLY create child nodes? Business cases: 1. different level nodes

  • Error in smartform japaneese output allignment

    Hi experts, I am getting the following output when i am sending an email . I am using a smartform for that display. My problem is field allignment as shown in the below records. Because of small characters in japaneese language we are not getting the

  • I never received my deposit refund of $250

    I was told that my refund would be returned after a year of subscription as long as I have no late payments. I made the deposit on oct 12 last year and I have no late payments. I called the financial services a few days before oct 12 of this year and

  • Pairing iPhone to MIFI 4620L Jetpack

    I'm doing something wrong so hopefully someone can help me.  While buying the Jetpack, the employee paired my iPhone to the Jetpack.  It works fine.  My wife's iPhone is not pairing or connecting.  Can someone help me figure out what I'm doing wrong?