Skip to Content

UPDATE SERIAL NUMBER IQ02 WITH BAPI

Hello Guys!!!!

I need your help.

Let me explain what I need to do.

After post GI on VL02N I want to take the customer number and set it on serial number(IQ02). I already searched a BAPI but was unsucessfull.

I have tried with these :

SERIAL_EQBS_POST

SERIALNUMBER_POST

Somebody have any idea?

I don't want make a call transacction, I want to do that with BAPI of FM

Really thanks in advance

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 24, 2010 at 05:10 AM

    hi ,

    You can update serial numbers while GI in VL02N by using FM

    CALL FUNCTION 'WS_DELIVERY_UPDATE'

    EXPORTING

    vbkok_wa = wa_vbkok

    synchron = 'X'

    update_picking = 'X'

    nicht_sperren = 'X'

    commit = 'X'

    delivery = lips-vbeln

    it_sernr_update = i_sernr ** For Serial Numbers*

    IMPORTING

    ef_error_any_0 = e1

    ef_error_in_item_deletion_0 = e2

    ef_error_in_pod_update_0 = e3

    ef_error_in_interface_0 = e4

    ef_error_in_goods_issue_0 = e5

    ef_error_in_final_check_0 = e6

    ef_error_partner_update = e7

    ef_error_sernr_update = e8

    TABLES

    prot = i_prott[]

    vbpok_tab = i_vbpok[]

    EXCEPTIONS

    error_message = 1

    OTHERS = 2.

    IF sy-subrc = 0 AND i_prott[] IS INITIAL.

    MESSAGE s000(38) WITH text-017 likp-vbeln text-018.

    endif.

    Thanks,

    Gaurav

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 24, 2010 at 08:19 PM

    I got it!!!!

    I made this code tnks a lot to everybody!!!!

    REPORT ztest_serialnumber_post.

    DATA: sl_equi TYPE equi,

    sl_eqbs TYPE eqbs.

    PARAMETERS: p_matnr TYPE matnr OBLIGATORY,

    p_equnr TYPE equnr OBLIGATORY.

    CLEAR sl_equi.

    SELECT SINGLE * INTO sl_equi

    FROM equi

    WHERE equnr EQ p_equnr.

    CHECK sy-subrc EQ 0.

    CLEAR: sl_eqbs.

    sl_eqbs-mandt = sy-mandt.

    sl_eqbs-kunnr = '4002'.

    CALL FUNCTION 'ITOB_SERIALNO_READ_SINGLE'

    EXPORTING

    i_lock = 'X'

    i_matnr = p_matnr

    i_sernr = p_equnr

    EXCEPTIONS

    not_successful = 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.

    CALL FUNCTION 'EQUIPMENT_SAVE'

    EXPORTING

    i_activity_type = 'V'

    i_itob_type = '03'

    i_equi_old = sl_equi

    i_no_data_check = 'X'

    i_no_extnum_check = 'X'

    i_sync_asset = 'X'

    i_write_cdocs = 'X'

    i_status_cdocs = 'X'

    i_success_message = 'X'

    i_commit_work = 'X'

    CHANGING

    c_equi_rec = sl_equi

    c_eqbs_rec = sl_eqbs

    EXCEPTIONS

    err_data_check = 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.

    CALL FUNCTION 'EQUIPMENT_UNLOCK'

    EXPORTING

    equi_no = p_equnr

    EXCEPTIONS

    equi_not_found = 1

    lock_failure = 2

    OTHERS = 3.

    IF sy-subrc <> 0.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ENDIF.

    Edited by: David Morales on Nov 24, 2010 9:28 PM

    Add a comment
    10|10000 characters needed characters exceeded

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.