Skip to Content
author's profile photo Former Member
Former Member

Help need on Status_change_extern

Hi experts,

i am doing BDC program for Creating Maintenance order through tcode IW22.

there i need upload user statuses.

i think i can use Status_change_extern function module.

please give me some test data for multiple statuese for this.

thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 26, 2005 at 03:58 AM

    see below example code. The minimum things you need to pass is Object number OBJNR that you will get it from AUFK Order master data table and you need to pass required status to change that you have to pass. In the below cod you will find the master table for that.

    Let me know if you need any thing further.

    data : l_estat like tj30t-estat.

    • Get the internal status for the QCAL.

    select estat

    into l_estat

    from tj30t

    up to 1 rows

    where spras eq sy-langu and

    txt04 eq c_qcal.

    endselect.

    if sy-subrc eq 0.

    call function 'STATUS_CHANGE_EXTERN'

    exporting

    • CHECK_ONLY = ' '

    • CLIENT = SY-MANDT

    objnr = p_objnr

    user_status = l_estat

    • SET_INACT = ' '

    set_chgkz = 'X'

    • IMPORTING

    • STONR =

    exceptions

    object_not_found = 1

    status_inconsistent = 2

    status_not_allowed = 3

    others = 4.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi

      In that example the status code is extracted by its defintion, but if you know the status code you dont' need that select.

      The same status can use for several application and each application have own procedure (Profile).

      Max

      Message was edited by: max bianchi

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.