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

BAPI 'X' indicator

1.what is the use of "call fm update task" ? please give me a example senario in which we use it?

2. what is the use of "starting new task"? please give me a example senario in which we use it?

3. In BAPI why does we pass 'X' indicator? How does the 'X' indicator effect database table when BAPI is of any of the modes U = change

D = delete, I = add

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Oct 16, 2006 at 05:50 PM

    Hi,

    From your example codes, the 'X' indicator is used to indicate/select which field that you want to change or delete.

    Regards,

    Ferry Lianto

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Ferry,

      I will be clear with my question.

      What does 'X' indicator do when the BAPI is of any of the UPDATEFLAGS: U = change, D = delete, I = add.

      for example if the BAPi update flag is set to "D". Does the 'X' indicator will be delete the matching record from the BAPI record?

      Thanks

      SDN FAN

  • Posted on Oct 16, 2006 at 05:01 PM

    Hi,

    1.what is the use of "call fm update task" ? please give me a example senario in which we use it?

    Please check this link for detail information and sample codes.

    http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4e3a79e11d1950f0000e82de14a/content.htm

    2.what is the use of "starting new task"? please give me a example senario in which we use it?

    Please check this link for detail information and sample codes.

    http://help.sap.com/saphelp_nw04/helpdata/en/3d/a846df17c1014e928626637ab06838/content.htm

    3. In BAPI why does we pass 'X' indicator? How does the 'X' indicator effect database table when BAPI is of any of the modes U = change

    D = delete, I = add

    Any example for the BAPI?

    Regards,

    Ferry Lianto

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member
      • Populate header data

      wa_poheaderx-doc_type = 'X'.

      wa_poheader-doc_type = 'TRP'.

      wa_poheaderx-vendor = 'X'.

      wa_poheader-vendor = xlfa1-lifnr.

      wa_poheaderx-purch_org = 'X'.

      wa_poheader-purch_org = xtvfp-ekorg.

      wa_poheaderx-pur_group = 'X'.

      wa_poheader-pur_group = xtvfp-ekgrp.

      wa_poheaderx-comp_code = 'X'.

      wa_poheader-comp_code = hold_bukrs.

      wa_poheader-currency = xlfm1-waers.

      wa_poheaderx-currency = 'X'.

      wa_poheader-doc_date = sy-datum.

      wa_poheaderx-doc_date = 'X'.

      *

      • Populate all item data

      itab_poitem-short_text = 'Outbound Freight'.

      itab_poitemx-short_text = 'X'.

      itab_poitem-plant = xtvfp-werks.

      itab_poitemx-plant = 'X'.

      IF xlfa1-lifnr = 'BSUR' AND xlfm1-ekorg = '0501'.

      itab_poitem-tax_code = 'I4'.

      ELSE.

      itab_poitem-tax_code = hold_mwskz.

      ENDIF.

      IF hold_xersy IS INITIAL.

      itab_poitem-SRV_BASED_IV = 'X'.

      itab_poitemx-SRV_BASED_IV = 'X'.

      ENDIF.

      itab_poitemx-tax_code = 'X'.

      itab_poitem-quantity = '100'.

      itab_poitemx-quantity = 'X'.

      itab_poitem-net_price = '0.01'.

      itab_poitemx-net_price = 'X'.

      itab_poitem-price_unit = '1'.

      itab_poitemx-price_unit = 'X'.

      itab_poitem-price_date = sy-datum.

      itab_poitem-pckg_no = '0002132463'.

      itab_poitemx-price_date = 'X'.

      itab_poitemx-pckg_no = 'X'.

      itab_poitem-matl_group = 'SERVICE'.

      itab_poitemx-matl_group = 'X'.

      itab_poitem-item_cat = '9'.

      itab_poitemx-item_cat = 'X'.

      itab_poitem-acctasscat = '1'.

      itab_poitemx-acctasscat = 'X'.

      itab_poitemx-po_item = '00010'.

      itab_poitem-po_item = '00010'.

      itab_poitemx-po_itemx = 'X'.

      itab_poitem-period_ind_expiration_date = 'D'.

      itab_poitemx-period_ind_expiration_date = 'X'.

      APPEND itab_poitem.

      APPEND itab_poitemx.

      *

      • Populate Limits data

      itab_polimits-pckg_no = '0002132463'.

      itab_polimits-no_limit = 'X'.

      itab_polimits-exp_value = '.01'.

      itab_polimits-price_chg = 'X'.

      itab_polimits-no_frlimit = 'X'.

      APPEND itab_polimits.

      *

      • Poulate Services data

      itab_poservices-pckg_no = '0002132463'.

      itab_poservices-line_no = '0000000001'.

      itab_poservices-outl_ind = 'X'.

      itab_poservices-from_line = '1'.

      APPEND itab_poservices.

      *

      • Populate Service acces values data

      itab_posrvaccessvalues-pckg_no = '0002132463'.

      itab_posrvaccessvalues-line_no = '0000000000'.

      itab_posrvaccessvalues-serno_line = '01'.

      itab_posrvaccessvalues-percentage = '100'.

      itab_posrvaccessvalues-quantity = '1.0'.

      itab_posrvaccessvalues-net_value = '.01'.

      itab_posrvaccessvalues-serial_no = '01'.

      APPEND itab_posrvaccessvalues.

      *

      • Populate item account informations

      itab_poaccountx-po_itemx = 'X'.

      itab_poaccount-po_item = '00010'.

      itab_poaccountx-po_item = '00010'.

      itab_poaccount-serial_no = '01'.

      itab_poaccountx-serial_no = 'X'.

      itab_poaccountx-gl_account = 'X'.

      itab_poaccount-gl_account = p_sakto.

      itab_poaccountx-quantity = 'X'.

      itab_poaccount-quantity = '1'.

      itab_poaccountx-tax_code = 'X'.

      IF xlfa1-lifnr = 'BSUR' AND xlfm1-ekorg = '0501'.

      itab_poaccount-tax_code = 'I4'.

      ELSE.

      itab_poaccount-tax_code = hold_mwskz.

      ENDIF.

      APPEND itab_poaccount.

      APPEND itab_poaccountx.

      *

      • Populate item Po schedule informations

      itab_poschedulex-po_itemx = 'X'.

      itab_poschedule-po_item = '00010'.

      itab_poschedulex-po_item = '00010'.

      itab_poschedule-quantity = '1'.

      itab_poschedulex-quantity = 'X'.

      itab_poschedulex-sched_line = 'X'.

      itab_poschedule-sched_line = '0001'.

      itab_poschedulex-del_datcat_ext = 'X'.

      itab_poschedule-del_datcat_ext = 'M'.

      itab_poschedulex-delivery_date = 'X'.

      itab_poschedule-delivery_date = hold_date.

      APPEND itab_poschedule.

      APPEND itab_poschedulex.

      *

      • Bapi for creating the PO in ME21N

      CALL FUNCTION 'BAPI_PO_CREATE1'

      EXPORTING

      poheader = wa_poheader

      poheaderx = wa_poheaderx

      IMPORTING

      exppurchaseorder = wa_exppurchaseorder

      expheader = wa_expheader

      exppoexpimpheader = wa_exppoexpimpheader

      TABLES

      return = itab_return

      poitem = itab_poitem

      poitemx = itab_poitemx

      poschedule = itab_poschedule

      poschedulex = itab_poschedulex

      poaccount = itab_poaccount

      poaccountx = itab_poaccountx

      polimits = itab_polimits

      poservices = itab_poservices

      posrvaccessvalues = itab_posrvaccessvalues.

      *

  • author's profile photo Former Member
    Former Member
    Posted on Oct 16, 2006 at 05:35 PM
    • Populate header data

    wa_poheaderx-doc_type = 'X'.

    wa_poheader-doc_type = 'TRP'.

    wa_poheaderx-vendor = 'X'.

    wa_poheader-vendor = xlfa1-lifnr.

    wa_poheaderx-purch_org = 'X'.

    wa_poheader-purch_org = xtvfp-ekorg.

    wa_poheaderx-pur_group = 'X'.

    wa_poheader-pur_group = xtvfp-ekgrp.

    wa_poheaderx-comp_code = 'X'.

    wa_poheader-comp_code = hold_bukrs.

    wa_poheader-currency = xlfm1-waers.

    wa_poheaderx-currency = 'X'.

    wa_poheader-doc_date = sy-datum.

    wa_poheaderx-doc_date = 'X'.

    *

    • Populate all item data

    itab_poitem-short_text = 'Outbound Freight'.

    itab_poitemx-short_text = 'X'.

    itab_poitem-plant = xtvfp-werks.

    itab_poitemx-plant = 'X'.

    IF xlfa1-lifnr = 'BSUR' AND xlfm1-ekorg = '0501'.

    itab_poitem-tax_code = 'I4'.

    ELSE.

    itab_poitem-tax_code = hold_mwskz.

    ENDIF.

    IF hold_xersy IS INITIAL.

    itab_poitem-SRV_BASED_IV = 'X'.

    itab_poitemx-SRV_BASED_IV = 'X'.

    ENDIF.

    itab_poitemx-tax_code = 'X'.

    itab_poitem-quantity = '100'.

    itab_poitemx-quantity = 'X'.

    itab_poitem-net_price = '0.01'.

    itab_poitemx-net_price = 'X'.

    itab_poitem-price_unit = '1'.

    itab_poitemx-price_unit = 'X'.

    itab_poitem-price_date = sy-datum.

    itab_poitem-pckg_no = '0002132463'.

    itab_poitemx-price_date = 'X'.

    itab_poitemx-pckg_no = 'X'.

    itab_poitem-matl_group = 'SERVICE'.

    itab_poitemx-matl_group = 'X'.

    itab_poitem-item_cat = '9'.

    itab_poitemx-item_cat = 'X'.

    itab_poitem-acctasscat = '1'.

    itab_poitemx-acctasscat = 'X'.

    itab_poitemx-po_item = '00010'.

    itab_poitem-po_item = '00010'.

    itab_poitemx-po_itemx = 'X'.

    itab_poitem-period_ind_expiration_date = 'D'.

    itab_poitemx-period_ind_expiration_date = 'X'.

    APPEND itab_poitem.

    APPEND itab_poitemx.

    *

    • Populate Limits data

    itab_polimits-pckg_no = '0002132463'.

    itab_polimits-no_limit = 'X'.

    itab_polimits-exp_value = '.01'.

    itab_polimits-price_chg = 'X'.

    itab_polimits-no_frlimit = 'X'.

    APPEND itab_polimits.

    *

    • Poulate Services data

    itab_poservices-pckg_no = '0002132463'.

    itab_poservices-line_no = '0000000001'.

    itab_poservices-outl_ind = 'X'.

    itab_poservices-from_line = '1'.

    APPEND itab_poservices.

    *

    • Populate Service acces values data

    itab_posrvaccessvalues-pckg_no = '0002132463'.

    itab_posrvaccessvalues-line_no = '0000000000'.

    itab_posrvaccessvalues-serno_line = '01'.

    itab_posrvaccessvalues-percentage = '100'.

    itab_posrvaccessvalues-quantity = '1.0'.

    itab_posrvaccessvalues-net_value = '.01'.

    itab_posrvaccessvalues-serial_no = '01'.

    APPEND itab_posrvaccessvalues.

    *

    • Populate item account informations

    itab_poaccountx-po_itemx = 'X'.

    itab_poaccount-po_item = '00010'.

    itab_poaccountx-po_item = '00010'.

    itab_poaccount-serial_no = '01'.

    itab_poaccountx-serial_no = 'X'.

    itab_poaccountx-gl_account = 'X'.

    itab_poaccount-gl_account = p_sakto.

    itab_poaccountx-quantity = 'X'.

    itab_poaccount-quantity = '1'.

    itab_poaccountx-tax_code = 'X'.

    IF xlfa1-lifnr = 'BSUR' AND xlfm1-ekorg = '0501'.

    itab_poaccount-tax_code = 'I4'.

    ELSE.

    itab_poaccount-tax_code = hold_mwskz.

    ENDIF.

    APPEND itab_poaccount.

    APPEND itab_poaccountx.

    *

    • Populate item Po schedule informations

    itab_poschedulex-po_itemx = 'X'.

    itab_poschedule-po_item = '00010'.

    itab_poschedulex-po_item = '00010'.

    itab_poschedule-quantity = '1'.

    itab_poschedulex-quantity = 'X'.

    itab_poschedulex-sched_line = 'X'.

    itab_poschedule-sched_line = '0001'.

    itab_poschedulex-del_datcat_ext = 'X'.

    itab_poschedule-del_datcat_ext = 'M'.

    itab_poschedulex-delivery_date = 'X'.

    itab_poschedule-delivery_date = hold_date.

    APPEND itab_poschedule.

    APPEND itab_poschedulex.

    *

    • Bapi for creating the PO in ME21N

    CALL FUNCTION 'BAPI_PO_CREATE1'

    EXPORTING

    poheader = wa_poheader

    poheaderx = wa_poheaderx

    IMPORTING

    exppurchaseorder = wa_exppurchaseorder

    expheader = wa_expheader

    exppoexpimpheader = wa_exppoexpimpheader

    TABLES

    return = itab_return

    poitem = itab_poitem

    poitemx = itab_poitemx

    poschedule = itab_poschedule

    poschedulex = itab_poschedulex

    poaccount = itab_poaccount

    poaccountx = itab_poaccountx

    polimits = itab_polimits

    poservices = itab_poservices

    posrvaccessvalues = itab_posrvaccessvalues.

    *

    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.