Questions in BAPI_PO_CREATE1

In BAPI_PO_CREATE1 there are various tables like POITEM, POITEMX....
I wanted to know what is the purpose of the second table(POITEMX)...the documentation says its for the fields which have changed.
Can anyone kindly explain.

FUNCTION Z_BC1_BAPI_PO_CREATE02.
""Local Interface:
*"  IMPORTING
*"     VALUE(POHEADER) TYPE  BAPIMEPOHEADER
*"     VALUE(POHEADERX) TYPE  BAPIMEPOHEADERX
*"     VALUE(POADDRVENDOR) TYPE  BAPIMEPOADDRVENDOR
*"     VALUE(TESTRUN) TYPE  BAPIFLAG-BAPIFLAG
*"     VALUE(MEMORY_UNCOMPLETE) TYPE  BAPIFLAG-BAPIFLAG
*"     VALUE(MEMORY_COMPLETE) TYPE  BAPIFLAG-BAPIFLAG
*"     VALUE(POEXPIMPHEADER) TYPE  BAPIMEPOHEADER
*"     VALUE(POEXPIMPHEADERX) TYPE  BAPIMEPOHEADERX
*"     VALUE(VERSIONS) TYPE  BAPIMEDCM
*"     VALUE(NO_MESSAGING) TYPE  BAPIFLAG-BAPIFLAG
*"     VALUE(NO_MESSAGE_REQ) TYPE  BAPIFLAG-BAPIFLAG
*"     VALUE(NO_AUTHORITY) TYPE  BAPIFLAG-BAPIFLAG
*"     VALUE(NO_PRICE_FROM_PO) TYPE  BAPIFLAG-BAPIFLAG
*"  EXPORTING
*"     VALUE(EXPPURCHASEORDER) TYPE  BAPIMEPOHEADER-PO_NUMBER
*"     VALUE(EXPHEADER) TYPE  BAPIMEPOHEADER
*"     VALUE(EXPPOEXPIMPHEADER) TYPE  BAPIMEPOHEADER
*"  TABLES
*"      RETURN STRUCTURE  BAPIRET2
*"      POITEM STRUCTURE  BAPIMEPOITEM
*"      POITEMX STRUCTURE  BAPIMEPOITEMX
*"      POADDRDELIVERY STRUCTURE  BAPIMEPOADDRDELIVERY
*"      POSCHEDULE STRUCTURE  BAPIMEPOSCHEDULE
*"      POSCHEDULEX STRUCTURE  BAPIMEPOSCHEDULX
*"      POACCOUNT STRUCTURE  BAPIMEPOACCOUNT
*"      POACCOUNTPROFITSEGMENT STRUCTURE  BAPIMEPOACCOUNTPROFITSEGMENT
*"      POACCOUNTX STRUCTURE  BAPIMEPOACCOUNTX
*"      POCONDHEADER STRUCTURE  BAPIMEPOCOND
*"      POCONDHEADERX STRUCTURE  BAPIMEPOCONDX
*"      POCOND STRUCTURE  BAPIMEPOCOND
*"      POCONDX STRUCTURE  BAPIMEPOCONDX
*"      POLIMITS STRUCTURE  BAPIESUHC
*"      POCONTRACTLIMITS STRUCTURE  BAPIESUCC
*"      POSERVICES STRUCTURE  BAPIESLLC
*"      POSRVACCESSVALUES STRUCTURE  BAPIESKLC
*"      POSERVICESTEXT STRUCTURE  BAPIESLLTX
*"      EXTENSIONIN STRUCTURE  BAPIPAREX
*"      EXTENSIONOUT STRUCTURE  BAPIPAREX
*"      POEXPIMPITEM STRUCTURE  BAPIEIPO
*"      POEXPIMPITEMX STRUCTURE  BAPIEIPOX
*"      POTEXTHEADER STRUCTURE  BAPIMEPOTEXT
*"      POTEXTITEM STRUCTURE  BAPIMEPOTEXT
*"      ALLVERSIONS STRUCTURE  BAPIMEDCM_ALLVERSIONS
*"      POPARTNER STRUCTURE  BAPIEKKOP
*"  EXCEPTIONS
*"      WRONG_FUNCTION_CALLED
*"      TIMEOUT
*"      TCPIP_ERROR
*"      CONNECT_FAILED
*"      INTERNAL_ERROR
*"      SYSTEM_FAILURE
*"      COMMUNICATION_FAILURE
Program   :    Z_BC1_BAPI_PO_CREATE01
TITLE          Function Module to create PO using BAPI
AUTHOR         Aveek Ghose, IBM
DATE WRITTEN   20-May-2006
R/3 RELEASE    4.6C
CTS:           RD1K912067
COPIED FROM    N/A
This function module is called during PR Creation in Ariba ( at
checkpoint1, checkpoint2 and checkpoint3) and also during posting of
PO in SAP. The call to this function module is from WebMethods.
PROGRAM TYPE    Function Module
DEV. CLASS      ZP2P
LOGICAL DB      N/A
SCREENS         N/A
GUl TITLE       N/A
GUl STATUS      N/A
TRANSACTIONS    N/A
USER EXITS      N/A
       Local variables
  CONSTANTS:   C_VENDOR TYPE ELIFN  VALUE '4259999999',
               C_DOC_TYPE TYPE ESART  VALUE 'ZAPS',
               C_CURRENCY TYPE WAERS  VALUE 'EUR',
               C_NETPR  TYPE NETPR  VALUE '1.00',
               C_99     TYPE CHAR2 VALUE '99',
               C_00     TYPE CHAR2 VALUE '00'.
  DATA : L_VEND_ACTGRP(30) TYPE C,        "Vendor Account Group
         L_VEND_PAYTRM(30) TYPE C,        "Vendor Payment Terms
         L_VEND_RECON(30)  TYPE C,        "Vendor Reconciliation Account
         L_MSGV1           LIKE SY-MSGV1, "Message variable1
         L_LENGTH          TYPE I,        "Vendor string length.
         L_WBS_EXTERNAL    LIKE BAPIMEPOACCOUNT-WBS_ELEMENT,
                                           "WBS external format
         L_WBS_INTERNAL    LIKE BAPIMEPOACCOUNT-WBS_ELEMENT,
         L_bukrs type bukrs.
  DATA: l_werks1 type werks_d.
  "WBS internal format
*BV-08-July-2004 -Begin - Change error handling for zxa_get_constant
  DATA : L_CONST_NAME  LIKE SY-MSGV1,   "Constant name
         L_COMP_CODE   LIKE SY-MSGV2.   "Company code
DATA: L_WA_TIMESTAMP TYPE ZPO_TIMESTAMP.
  DATA: L_WA_TIMESTAMP TYPE ZP2P_TIMESTAMP.
  DATA: l_serial_no LIKE poaccount-serial_no.
  DATA: L_SERIAL TYPE I.
  DATA: L_RETURN  TYPE C.
  DATA: L_EXIT TYPE I.
*BV-08-July-2004 -End - Change error handling for zxa_get_constant
       Internal Table
  DATA : T_TEMP_POACCOUNT LIKE POACCOUNT OCCURS 0 WITH HEADER LINE,
                                          "To store items with blank GL
*PVU-22-May-2004 - Start Changes for SCR1
         G_T_ITEMX_TMP     LIKE POITEMX      OCCURS 0 WITH HEADER LINE,
         G_T_SCHDX_TMP     LIKE POSCHEDULEX  OCCURS 0 WITH HEADER LINE,
         G_T_SCHD_TMP     LIKE POSCHEDULE    OCCURS 0 WITH HEADER LINE,
         G_T_ACCNTX_TMP    LIKE POACCOUNTX   OCCURS 0 WITH HEADER LINE,
         G_T_CONDX_TMP     LIKE POCONDX      OCCURS 0 WITH HEADER LINE.
       Structure
  DATA: G_W_HDRX_TMP LIKE POHEADERX.
  DATA: p_constname TYPE  zconstname,  "Constant Name
        g_constval  TYPE  zconstval,   "Constant Value
        tbx         TYPE  SY-TABIX.
  data: l_waers type waers.
  DATA: L_EKORG TYPE EKORG.
*PVU-22-May-2004 - End Changes for SCR1
  CLEAR   : G_FLG_VENDOR,
start of change for TPR2220 - DDUTTA - 07/08/2004
            t_znonpo_document,
            t_znonpo_acctg,
End of change for TPR2220 - DDUTTA - 07/08/2004
*PVU-22-May-2004 - Start Changes for SCR1
            G_IDOC_NO,
            G_W_HDRX_TMP.
*PVU-22-May-2004 - End Changes for SCR1
  REFRESH : RETURN, T_ZRETURN,
start of change for TPR2220 - DDUTTA - 07/08/2004
            t_znonpo_document,
            t_znonpo_acctg,
End of change for TPR2220 - DDUTTA - 07/08/2004
*PVU-22-May-2004 - Start Changes for SCR1
            G_T_IDOC_DATA,
            G_T_ITEMX_TMP,
            G_T_SCHDX_TMP,
            G_T_ACCNTX_TMP,
            G_T_CONDX_TMP.
*PVU-22-May-2004 - End Changes for SCR1
Srini 17-May-2005 Start of changes
Developer Flexibility to debug issues
  p_constname = 'BAPI_PO_CREATE2'.
  do.
    CALL FUNCTION 'ZXA_GET_CONSTANT'
         EXPORTING
              const_name     = p_constname
            comp_code      = poheader-comp_code
         IMPORTING
              const_value    = g_constval
         EXCEPTIONS
              no_value_found = 1
              null_value     = 2
              OTHERS         = 3.
    if g_constval ne 'X'.
      exit.
    endif.
  enddo.
Add of change: SDR: 12-Aug-2005
IF poheader-po_number IS INITIAL.
   poheader-doc_type = 'ZEHS'.
else.
*mod-003
  IF poheader-po_number+0(1) = 'C'.
    poheader-doc_type = 'ZAC'.
  ENDIF.
  IF poheader-po_number+0(1) = 'P'.
    poheader-doc_type = 'ZAP'.
  ENDIF.
  IF poheader-po_number IS INITIAL.
    poheader-doc_type = 'ZAPS'.
  ENDIF.
  DELETE FROM ZP2P_ERRORS WHERE BEACON_DOC_NO = POHEADER-PO_NUMBER.
  DELETE FROM ZP2P_ERRORS WHERE TYPE NE C_E.
DELETE FROM ZERRORS WHERE BEACON_DOC_NO = POHEADER-PO_NUMBER.
DELETE FROM ZERRORS WHERE TYPE NE C_E.
*MOD-004
  l_wa_timestamp-mandt          = SY-MANDT.
  l_wa_timestamp-EBELN          = POHEADER-PO_NUMBER.
  l_wa_timestamp-EBELP          = '00'.
  l_wa_timestamp-CREATE_TIMESTMP = POHEADER-ARIBACRTTIMESTMP.
  l_wa_timestamp-CREATE_TIMESTMP = POHEADER-ARIBACHGTIMESTMP.
  insert into ZP2P_TIMESTAMP values l_wa_timestamp.
*MOD-004
ENDIF.
*mod-003
*mod-003
if not poheader-comp_code is initial.
  if poheader-comp_code is initial.
    clear: l_bukrs.
   select single companycode
   into l_bukrs
   from zcompanycodes01
  where companycode = poheader-comp_code and
   where FSID        = poheader-fsid and
         le          = poheader-le and
         frmrc       = poheader-frmrc.
    select single companycode
    into l_bukrs
    from ZP2P_COMPANYCODE
    where FSID        = poheader-fsid and
          le          = poheader-le and
          frmrc       = poheader-frmrc.
    if sy-subrc ne 0.
      CLEAR L_MSGV1.
      L_MSGV1 = T_TEMP_POACCOUNT-PO_ITEM.
Please Enter an Account number for line
      CALL FUNCTION 'BALW_BAPIRETURN_GET2'
           EXPORTING
                TYPE   = C_MSGTYPE_E
                CL     = C_MSGID_Z001
                NUMBER = C_MSGNR_618
                PAR1   = L_MSGV1
           IMPORTING
                RETURN = RETURN.
      APPEND RETURN.
      CLEAR  RETURN.
    else.
      poheader-comp_code = l_bukrs.
    endif.
  endif.
*mod-003
End of Change: SDR: 12-Aug-2005
Srini 10-May-2005 Start of changes
Pass the value of SERIAL_NO from POACCOUNT to POACCOUNTX.
  LOOP AT POACCOUNTX.
    MOVE SY-TABIX to TBX.
    READ TABLE POACCOUNT INDEX TBX.
    IF SY-SUBRC EQ 0 AND POACCOUNTX-SERIAL_NO IS INITIAL.
      POACCOUNTX-SERIAL_NO = POACCOUNT-SERIAL_NO.
      MODIFY POACCOUNTX INDEX TBX.
    ENDIF.
  ENDLOOP.
Srini 10-May-2005 End of changes
Srini 17-May-2005 End of changes
  T_TEMP_POACCOUNT[] = POACCOUNT[].
To retrieve the line items with blank GL Account Number
  PERFORM FILTER_ITEMS TABLES T_TEMP_POACCOUNT.
  LOOP AT T_TEMP_POACCOUNT.
    CLEAR L_MSGV1.
    L_MSGV1 = T_TEMP_POACCOUNT-PO_ITEM.
Please Enter an Account number for line
    CALL FUNCTION 'BALW_BAPIRETURN_GET2'
         EXPORTING
              TYPE   = C_MSGTYPE_E  "E
              CL     = C_MSGID_Z001                         "Z001
              NUMBER = C_MSGNR_037  "037
              PAR1   = L_MSGV1
         IMPORTING
              RETURN = RETURN.
    APPEND RETURN.
    CLEAR  RETURN.
    loop at return.
      l_wa_zerrors-OBJECT     = 'PURCHASE_ORDER'.
      l_wa_zerrors-serial_no   = sy-tabix.
      l_wa_zerrors-COMP_CODE  = poheader-comp_code.
      l_wa_zerrors-type       = return-type.
      l_wa_zerrors-zid        = return-id.
      l_wa_zerrors-znumber    = return-number.
      l_wa_zerrors-BEACON_DOC_NO = poheader-po_number.
      l_wa_zerrors-SRC_DOC_NO = poheader-po_number.
      l_wa_zerrors-ZDATE      = sy-datum.
      l_wa_zerrors-ERR_MSG    = return-message.
      append l_wa_zerrors to t_errors.
    insert into zerrors values l_wa_zerrors.
      clear: l_wa_zerrors.
    endloop.
  ENDLOOP.
On Error, exit the function module
  READ TABLE RETURN WITH KEY TYPE = C_E.  " 'E'
  IF SY-SUBRC EQ 0.
    EXPHEADER = POHEADER.
    EXPHEADER-CODE = '99'.
    EXIT.
  ENDIF.
*MOD-005
On Error, exit the function module
l_exit = 0.
LOOP AT RETURN WHERE TYPE = C_E.
   L_EXIT = 1.
   expheader      = poheader.
   EXPHEADER-CODE = C_99.
   RETURN-RETURN_CODE = C_99.
   RETURN-SEQ_CODE    = C_99.
   MODIFY RETURN TRANSPORTING RETURN_CODE SEQ_CODE.
ENDLOOP..
IF L_EXIT = 1.
   EXIT.
ENDIF.
**MOD-005
*MOD-005
**MOD-004
L_RETURN = ' '..
LOOP AT RETURN WHERE TYPE = C_E.
   RETURN-RETURN_CODE = '99'.
   L_RETURN = C_X.
   MODIFY RETURN TRANSPORTING RETURN_CODE.
ENDLOOP.
IF L_RETURN = C_X.
   EXIT.
ENDIF.
**MOD-004
Begin of Change: Soumya D Roy: 12/27/2005
Forcibly refresh the T_YRETURN table as a part of the conversion
program since this table is not getting refreshed
  REFRESH t_yreturn.
  CLEAR   t_yreturn.
End of Change: Soumya D Roy: 12/27/2005
****BV-27-May-2004 - Begin of Changes for SCR2****
*mod-003
  DATA: L_TABIX TYPE SY-TABIX.
  LOOP AT POITEM.
    TBX = SY-TABIX.
    l_wa_timestamp-mandt          = SY-MANDT.
    l_wa_timestamp-EBELN          = POHEADER-PO_NUMBER.
    l_wa_timestamp-EBELP          = POITEM-PO_ITEM.
  l_wa_timestamp-CHANGE_IND     = 'A'.
    l_wa_timestamp-CREATE_TIMESTMP = POITEM-ARIBACRTTIMESTMP.
    l_wa_timestamp-CREATE_TIMESTMP = POITEM-ARIBAUPDTIMESTMP.
  l_wa_timestamp-DATE_TIME_STMP = POITEM-ARIBACRTTIMESTMP.
  insert into ZP2P_TIMESTAMP values l_wa_timestamp.
    insert into ZP2P_TIMESTAMP values l_wa_timestamp.
    clear: poheader-ARIBACRTTIMESTMP,
           poheader-ARIBACHGTIMESTMP.
    IF NOT POITEM-DISTRIB IS INITIAL.
      CLEAR : L_CONST_NAME,
              L_COMP_CODE.
      READ TABLE POACCOUNT INDEX L_TABIX.
      IF SY-SUBRC EQ 0.
        L_CONST_NAME  = POACCOUNT-GL_ACCOUNT.
        L_COMP_CODE   = L_comp_code.
        CALL FUNCTION 'BALW_BAPIRETURN_GET2'
             EXPORTING
                  type   = c_msgtype_e  "E
                  cl     = c_msgid_z001
                  number = c_msgnr_613
                  PAR1   = L_CONST_NAME
                  PAR2   = L_COMP_CODE
             IMPORTING
                  return = t_yreturn.
        APPEND t_yreturn.
        CLEAR  t_yreturn.
        loop at t_yreturn.
          l_wa_zerrors-OBJECT     = 'PURCHASE_ORDER'.
          l_wa_zerrors-serial_no   = sy-tabix.
          l_wa_zerrors-COMP_CODE  = poheader-comp_code.
          l_wa_zerrors-type       = t_yreturn-type.
          l_wa_zerrors-zid        = t_yreturn-id.
          l_wa_zerrors-znumber    = t_yreturn-number.
          l_wa_zerrors-BEACON_DOC_NO = poheader-po_number.
          l_wa_zerrors-SRC_DOC_NO = poheader-po_number.
          l_wa_zerrors-ZDATE      = sy-datum.
          l_wa_zerrors-ERR_MSG    = t_yreturn-message.
          append l_wa_zerrors to t_errors.
        insert into zerrors values l_wa_zerrors.
          clear: l_wa_zerrors.
        endloop.
      ENDIF.
    ENDIF.
  ENDLOOP.
if not poheader-currency is initial.
   if not poheader-vendor is initial.
     loop at pocond.
       SELECT SINGLE WAERS
       INTO L_WAERS
       FROM LFM1 WHERE
       LIFNR = POHEADER-VENDOR
       AND EKORG = POHEADER-PURCH_ORG.
       IF SY-SUBRC NE 0.
         IF L_WAERS NE  poheader-currency.
           pocond-cond_type = 'PBXX'.
           pocond-currency    = l_waers.
           modify pocond transporting cond_value currency.
         endif.
       ENDIF.
     endloop.
   ENDIF.
ENDIF.
  IF NOT TESTRUN IS INITIAL.
    POHEADER-VENDOR = '4259999999'.
    poheader-doc_type = 'ZAPS'.
  ENDIF.
IF NOT POHEADER-PURCH_ORG IS INITIAL.
  IF POHEADER-PURCH_ORG IS INITIAL.
    SELECT SINGLE PUR_ORG
    INTO L_EKORG
    FROM ZP2P_PURCHASEORG
  FROM ZPUR_ORG
    WHERE LE    = POHEADER-LE AND
          FRMRC = POHEADER-FRMRC AND
          FSID  = POHEADER-FSID.
    IF SY-SUBRC NE 0.
      CLEAR : L_CONST_NAME,
              L_COMP_CODE.
      L_CONST_NAME  = C_p2p_pur_ORG.
      L_COMP_CODE   = POHEADER-COMP_CODE.
      CALL FUNCTION 'BALW_BAPIRETURN_GET2'
           EXPORTING
                TYPE   = c_msgtype_e
                CL     = c_msgid_z001
                NUMBER = c_msgnr_619
                PAR1   = L_CONST_NAME
                PAR2   = L_COMP_CODE
           IMPORTING
                RETURN = RETURN.
      APPEND RETURN.
      CLEAR  RETURN.
      loop at t_yreturn.
        l_wa_zerrors-OBJECT     = 'PURCHASE_ORDER'.
        l_wa_zerrors-serial_no   = sy-tabix.
        l_wa_zerrors-COMP_CODE  = poheader-comp_code.
        l_wa_zerrors-zid        = t_yreturn-id.
        l_wa_zerrors-type       = return-type.
        l_wa_zerrors-znumber    = t_yreturn-number.
        l_wa_zerrors-BEACON_DOC_NO = poheader-po_number.
        l_wa_zerrors-SRC_DOC_NO = poheader-po_number.
        l_wa_zerrors-ZDATE      = sy-datum.
        l_wa_zerrors-ERR_MSG    = return-message.
        append l_wa_zerrors to t_errors.
       insert into zerrors values l_wa_zerrors.
        clear: l_wa_zerrors.
      endloop.
      EXIT.
    ELSE.
      POHEADER-PURCH_ORG = L_EKORG.
    ENDIF.
  ENDIF.
IF NOT POHEADER-PUR_GROUP IS INITIAL.
  IF POHEADER-PUR_GROUP IS INITIAL.
    clear: g_constval.
    CALL FUNCTION 'ZXA_GET_CONSTANT'
         EXPORTING
              const_name     = c_p2p_pur_org
              comp_code      = POHEADER-COMP_CODE
         IMPORTING
              const_value    = g_constval
         EXCEPTIONS
              no_value_found = 1
              null_value     = 2
              OTHERS         = 3.
    IF SY-SUBRC NE 0.
      CLEAR : L_CONST_NAME,
              L_COMP_CODE.
      L_CONST_NAME  = C_p2p_pur_org.
      L_COMP_CODE   = POHEADER-COMP_CODE.
      CALL FUNCTION 'BALW_BAPIRETURN_GET2'
           EXPORTING
                TYPE   = c_msgtype_e
                CL     = c_msgid_z001
                NUMBER = c_msgnr_046
                PAR1   = L_CONST_NAME
                PAR2   = L_COMP_CODE
           IMPORTING
                RETURN = RETURN.
      APPEND RETURN.
      CLEAR  RETURN.
      loop at t_yreturn.
        l_wa_zerrors-OBJECT     = 'PURCHASE_ORDER'.
        l_wa_zerrors-serial_no   = sy-tabix.
        l_wa_zerrors-COMP_CODE  = poheader-comp_code.
        l_wa_zerrors-zid        = t_yreturn-id.
        l_wa_zerrors-type       = return-type.
        l_wa_zerrors-znumber    = t_yreturn-number.
        l_wa_zerrors-BEACON_DOC_NO = poheader-po_number.
        l_wa_zerrors-SRC_DOC_NO = poheader-po_number.
        l_wa_zerrors-ZDATE      = sy-datum.
        l_wa_zerrors-ERR_MSG    = return-message.
        append l_wa_zerrors to t_errors.
       insert into zerrors values l_wa_zerrors.
        clear: l_wa_zerrors.
      endloop.
      EXIT.
    ELSE.
      POHEADER-PUR_GROUP = G_CONSTVAL.
    ENDIF.
  ENDIF.
  LOOP AT poitem.
    if poitem-plant is initial.
      clear: l_werks1.
      select single plant
      into l_werks1
      from ZP2P_PLANTMAPING
    from zpo_plantmapping
      where COMPANY_CODE = poheader-comp_code and
          PUR_ORG      = poheader-purch_org and
          PUR_GROUP    = poheader-pur_group and
            LE           = poheader-le and
            FSID         = poheader-fsid and
            MRC          = poheader-mrc and
            FRMRC        = poheader-frmrc.
      if sy-subrc ne 0.
        PERFORM ERROR_HANDLING_PLANT USING   POHEADER
                                             poheader-comp_code
                                             L_WA_ZERRORS.
        EXIT.
      else.
        poitem-plant = l_werks1.
        CLEAR: L_WERKS1.
      endif.
    endif.
   IF POITEM-NET_PRICE NE POHEADER-CURRENCY.
     POITEM-NET_PRICE = POHEADER-CURRENCY.
   ENDIF.
*mod-004
    IF POITEM-net_price NE 0.
      POITEM-IR_IND = 'X'.
    ENDIF.
*mod-004
    IF POITEM-net_price eq 0.
      POITEM-IR_IND = 'X'.
    ENDIF.
*MOD-004
    if POITEM-GR_IND = C_Y..
      POITEM-GR_IND = C_X.
    ELSEIF POITEM-GR_IND = C_X.
      POITEM-GR_IND = C_X.
    ELSE.
      POITEM-GR_IND = ' '.
    endif.
*MOD-004
   if POITEM-GR_IND = 'Y'..
       POITEM-GR_IND = 'X'.
   endif.
    if POITEM-INCOTERMS1 is initial.
      POITEM-INCOTERMS1 = 'CIF'.
    endif.
    if POITEM-INCOTERMS2  is initial.
      POITEM-INCOTERMS2 = 'CIF'.
    endif.
    LOOP AT POACCOUNT WHERE PO_ITEM = POITEM-PO_ITEM.
      IF POITEM-DISTRIB IS INITIAL.
        POACCOUNT-DISTR_PERC = '0.00'.
        MODIFY POACCOUNT TRANSPORTING DISTR_PERC.
      ENDIF.
    ENDLOOP.
    POITEM-UNLIMITED_DLV = 'X'.
    POITEM-UNDER_DLV_TOL = 0.
    clear: poitem-ARIBACRTTIMESTMP,
           poitem-ARIBAUPDTIMESTMP.
    MODIFY POITEM TRANSPORTING UNLIMITED_DLV
                               UNDER_DLV_TOL
                               PLANT
                               IR_IND
                               GR_IND
                               INCOTERMS1
                               INCOTERMS2
                               ARIBACRTTIMESTMP
                               ARIBAUPDTIMESTMP.
  ENDLOOP.
*-- Retrieve Account Assignment
  PERFORM get_account_assignment TABLES   poitem
                                          poitemx
                                          poaccount
                                          poaccountx
                                          t_yreturn
                                 USING    poheader-comp_code
                                          poheader.
*mod-003
  IF NOT t_yreturn[] IS INITIAL.
    APPEND LINES OF t_yreturn TO RETURN.
*& Begin of Change: 26-Sep-2005 SDUTTARO RD1K910316     *&
    READ TABLE t_yreturn WITH KEY type = 'W'.
    IF sy-subrc <> 0.
      expheader = poheader.
      EXPHEADER-CODE = '99'.
    ENDIF.
**MOD-005
On Error, exit the function module
   l_exit = 0.
   LOOP AT RETURN WHERE TYPE = C_E.
     L_EXIT = 1.
     expheader      = poheader.
     EXPHEADER-CODE = '99'.
     RETURN-RETURN_CODE = C_99.
     RETURN-SEQ_CODE    = C_99.
     MODIFY RETURN TRANSPORTING RETURN_CODE SEQ_CODE.
   ENDLOOP..
   IF L_EXIT = 1.
     EXIT.
   ENDIF.
**MOD-005
*& End of Change: 26-Sep-2005 SDUTTARO RD1K910316       *&
  ENDIF.
*mod-003
if not poheader-currency is initial.
   if not poheader-vendor is initial.
     loop at pocond.
       SELECT SINGLE WAERS
       INTO L_WAERS
       FROM LFM1 WHERE
       LIFNR = POHEADER-VENDOR
       AND EKORG = POHEADER-PURCH_ORG.
       IF SY-SUBRC NE 0.
         IF L_WAERS NE  poheader-currency.
           pocond-cond_type = 'PBXX'.
           pocond-currency    = l_waers.
           modify pocond transporting cond_value currency.
         endif.
       ENDIF.
     endloop.
   ENDIF.
ENDIF.
*currency check MOD-004
DATA:   l_header TYPE REF TO cl_po_header_handle_mm,
         l_item   TYPE REF TO cl_po_item_handle_mm,
         l_tkomv  TYPE STANDARD TABLE OF komv INITIAL SIZE 10,
         l_item_conditions_changed TYPE mmpur_bool.
header level pocond data
   CHECK NOT l_item IS INITIAL.
   CHECK NOT l_item->po_item_number IS INITIAL.
   l_header ?= l_item->my_parent.
   CALL METHOD l_header->get_tkomv IMPORTING
            ex_tkomv              = l_tkomv.
   l_item_conditions_changed = mmpur_no.
   PERFORM pai_item_conditions IN PROGRAM saplmepo
                  TABLES   l_tkomv
                  USING    poitem-po_item
                  CHANGING l_item_conditions_changed.
   IF NOT l_item_conditions_changed IS INITIAL.
     CALL METHOD l_header->set_tkomv EXPORTING
               im_tkomv                   = l_tkomv
               im_item_conditions_changed = l_item_conditions_changed.
Item level POCOND data
  LOOP AT POITEM.
*.     CALL FUNCTION 'MEPO_DOC_PBO_ITEM_CONDITIONS'
        EXPORTING
             im_ebelp      = poitem-po_item
        EXCEPTIONS
             error_message = 1.
  ENDLOOP.
   ENDIF.
*currency check mod-004
*MOD-003
  IF NOT TESTRUN IS INITIAL.
    POHEADER-VENDOR = '4259999999'.
    poheader-doc_type = 'ZAPS'.
  ENDIF.
*MOD-003
IF NOT POHEADER-PURCH_ORG IS INITIAL.
  IF POHEADER-PURCH_ORG IS INITIAL.
    SELECT SINGLE PUR_ORG
    INTO L_EKORG
  FROM ZPUR_ORG
    FROM ZP2P_PURCHASEORG
    WHERE LE    = POHEADER-LE AND
          FRMRC = POHEADER-FRMRC AND
          FSID  = POHEADER-FSID.
    IF SY-SUBRC NE 0.
      CLEAR : L_CONST_NAME,
              L_COMP_CODE.
      L_CONST_NAME  = C_p2p_pur_ORG.
      L_COMP_CODE   = POHEADER-COMP_CODE.
      CALL FUNCTION 'BALW_BAPIRETURN_GET2'
           EXPORTING
                TYPE   = c_msgtype_e
                CL     = c_msgid_z001
                NUMBER = c_msgnr_619
                PAR1   = L_CONST_NAME
                PAR2   = L_COMP_CODE
           IMPORTING
                RETURN = RETURN.
      APPEND RETURN.
      CLEAR  RETURN.
      loop at t_yreturn.
        l_wa_zerrors-OBJECT     = 'PURCHASE_ORDER'.
        l_wa_zerrors-serial_no   = sy-tabix.
        l_wa_zerrors-COMP_CODE  = poheader-comp_code.
        l_wa_zerrors-zid        = t_yreturn-id.
        l_wa_zerrors-type       = return-type.
        l_wa_zerrors-znumber    = t_yreturn-number.
        l_wa_zerrors-BEACON_DOC_NO = poheader-po_number.
        l_wa_zerrors-SRC_DOC_NO = poheader-po_number.
        l_wa_zerrors-ZDATE      = sy-datum.
        l_wa_zerrors-ERR_MSG    = t_yreturn-message.
        append l_wa_zerrors to t_errors.
       insert into zerrors values l_wa_zerrors.
        clear: l_wa_zerrors.
      endloop.
      EXIT.
    ELSE.
      POHEADER-PURCH_ORG = L_EKORG.
    ENDIF.
  ENDIF.
IF NOT POHEADER-PUR_GROUP IS INITIAL.
  IF POHEADER-PUR_GROUP IS INITIAL.
    clear: g_constval.
    CALL FUNCTION 'ZXA_GET_CONSTANT'
         EXPORTING
              const_name     = c_p2p_pur_org
              comp_code      = POHEADER-COMP_CODE
         IMPORTING
              const_value    = g_constval
         EXCEPTIONS
              no_value_found = 1
              null_value     = 2
              OTHERS         = 3.
    IF SY-SUBRC NE 0.
      CLEAR : L_CONST_NAME,
              L_COMP_CODE.
      L_CONST_NAME  = C_p2p_pur_org.
      L_COMP_CODE   = POHEADER-COMP_CODE.
      CALL FUNCTION 'BALW_BAPIRETURN_GET2'
           EXPORTING
                TYPE   = c_msgtype_e
                CL     = c_msgid_z001
                NUMBER = c_msgnr_046
                PAR1   = L_CONST_NAME
                PAR2   = L_COMP_CODE
           IMPORTING
                RETURN = RETURN.
      APPEND RETURN.
      CLEAR  RETURN.
      loop at return.
        l_wa_zerrors-OBJECT     = 'PURCHASE_ORDER'.
        l_wa_zerrors-serial_no   = sy-tabix.
        l_wa_zerrors-COMP_CODE  = poheader-comp_code.
        l_wa_zerrors-zid        = return-id.
        l_wa_zerrors-type       = return-type.
        l_wa_zerrors-znumber    = return-number.
        l_wa_zerrors-BEACON_DOC_NO = poheader-po_number.
        l_wa_zerrors-SRC_DOC_NO = poheader-po_number.
        l_wa_zerrors-ZDATE      = sy-datum.
        l_wa_zerrors-ERR_MSG    = return-message.
        append l_wa_zerrors to t_errors.
       insert into zerrors values l_wa_zerrors.
        clear: l_wa_zerrors.
      endloop.
      EXIT.
    ELSE.
      POHEADER-PUR_GROUP = G_CONSTVAL.
    ENDIF.
  ENDIF.
*MOD-004
  LOOP AT POACCOUNT.
    if POACCOUNT-COSTCENTER EQ '0000000000' OR
       POACCOUNT-COSTCENTER EQ '0'.
      POACCOUNT-COSTCENTER = ' '.
      MODIFY POACCOUNT.
    endif.
  ENDLOOP.
*MOD-004
*MOD-003
  IF NOT TESTRUN IS INITIAL.
    L_SERIAL_NO = 0.
    L_TABIX = 0.
    POHEADER-VENDOR = C_VENDOR.
    poheader-doc_type = C_DOC_TYPE.
    poheader-comp_code = l_bukrs.
    POHEADER-DOC_DATE = SY-DATUM.
    POHEADER-CURRENCY = C_CURRENCY.
    POHEADER-NETPR = C_NETPR.
    LOOP AT POACCOUNT.
      L_TABIX = L_TABIX + 1.
      LOOP AT POITEM.
        if POACCOUNT-PO_ITEM is initial.
          POACCOUNT-PO_ITEM = SY-TABIX.
        endif.
        if POACCOUNT-SERIAL_NO  is initial.
          POACCOUNT-SERIAL_NO = L_TABIX.
        endif.
        MODIFY POACCOUNT.
      ENDLOOP.
    ENDLOOP.
*MOD-004
    IF POCOND[] IS INITIAL and
       NOT TESTRUN IS INITIAL.
     SELECT SINGLE WAERS
         INTO L_WAERS
         FROM LFM1 WHERE
         LIFNR = POHEADER-VENDOR
         AND EKORG = POHEADER-PURCH_ORG.
     IF SY-SUBRC NE 0.
       IF L_WAERS NE  poheader-currency.
      LOOP AT POITEM.
        pocond-itm_number  = poitem-po_item.
        POCOND-COND_ST_NO  = SY-TABIX.
        POCOND-COND_COUNT  = SY-TABIX.
        pocond-cond_value  = poitem-net_price.
        pocond-cond_type   = 'PBXX'.
        POCOND-CHANGE_ID   = 'I'.
        if not pocond-currency is initial.
          pocond-currency    = l_waers.
        endif.
        POCONDHEADER-itm_number  = poitem-po_item.
        POCONDHEADER-COND_ST_NO  = SY-TABIX.
        POCONDHEADER-COND_COUNT  = SY-TABIX.
        pocondHEADER-cond_value  = poitem-net_price.
        pocondHEADER-cond_type   = 'PBXX'.
        POCONDHEADER-CHANGE_ID   = 'I'.
        if not pocond-currency is initial.
          pocondHEADER-currency    = l_waers.
        endif.
        APPEND: POCOND,POCONDHEADER.
        CLEAR: POCOND, POCONDHEADER.
      ENDLOOP.
       endif.
     ENDIF.
    ENDIF.
*MOD-004
    IF POITEM[] IS INITIAL.
      POITEM-SHORT_TEXT = 'Simulation'(001).
      if poitem-plant is initial.
        clear: l_werks1.
        select single plant
        into l_werks1
      from zpo_plantmapping
        from zp2p_plantmaping
        where COMPANY_CODE = poheader-comp_code and
             PUR_ORG      = poheader-purch_org and
             PUR_GROUP    = poheader-pur_group and
              LE           = poheader-le and
              MRC          = poheader-mrc and
              FSID         = poheader-fsid and
              FRMRC        = poheader-frmrc.
        IF SY-SUBRC = 0.
          poitem-plant = l_werks1.
        ENDIF.
      endif.
      if poitem-po_item is initial.
        POITEM-PO_ITEM = L_TABIX.
      endif.
      if poitem-plant is initial.
        poitem-plant = l_werks1.
      endif.
      if POITEM-MATL_GROUP is initial.
        POITEM-MATL_GROUP = '99'.
      endif.
      if  POITEM-QUANTITY is initial.
        POITEM-QUANTITY = '1'.
      endif.
      if POITEM-PO_UNIT is initial.
        POITEM-PO_UNIT = 'EA'.
      endif.
      if POITEM-ORDERPR_UN is initial.
        POITEM-ORDERPR_UN = 'EA'.
      endif.
      if POITEM-NET_PRICE is initial.
        POITEM-NET_PRICE = '1.00'.
      endif.
      if POITEM-PRICE_UNIT is initial.
        POITEM-PRICE_UNIT = '1.00'.
      endif.
     if POITEM-DISTRIB is initial.
       POITEM-DISTRIB = ' '.
     endif.
     if POITEM-PART_INV is initial.
       POITEM-PART_INV = ' '.
     endif.
*MOD-004
      if POITEM-GR_IND = C_Y..
        POITEM-GR_IND = C_X.
      ELSEIF POITEM-GR_IND = C_X.
        POITEM-GR_IND = C_X.
      ELSE.
        POITEM-GR_IND = ' '.
      endif.
*MOD-004
**MOD-004
     if POITEM-GR_IND is initial or
        POITEM-GR_IND = c_y.
        POITEM-GR_IND = c_x.
     ELSE.
       POITEM-GR_IND = ' '.
     ENDIF.
**MOD-004
      if POITEM-IR_IND  is initial.
        POITEM-IR_IND = 'X'.
      endif.
      if POITEM-INCOTERMS1 is initial.
        POITEM-INCOTERMS1 = 'CIF'.
      endif.
      if POITEM-INCOTERMS2  is initial.
        POITEM-INCOTERMS2 = 'CIF'.
      endif.
      if POITEM-PREQ_ITEM is initial.
        POITEM-PREQ_ITEM  = '123456'.
      endif.
      APPEND POITEM.
      CLEAR: POITEM.
    ENDIF.
     if POACCOUNT-PO_ITEM is initial.
       POACCOUNT-PO_ITEM = SY-TABIX.
     endif.
     if POACCOUNT-SERIAL_NO  is initial.
       POACCOUNT-SERIAL_NO = L_TABIX.
     endif.
     MODIFY POACCOUNT.
   ENDIF.
ENDLOOP.
    PERFORM get_account_assignment TABLES   poitem
                                            poitemx
                                            poaccount
                                            poaccountx
                                            t_yreturn
                                   USING    poheader-comp_code
                                            poheader.
    IF NOT t_yreturn[] IS INITIAL.
      APPEND LINES OF t_yreturn TO RETURN.
      READ TABLE t_yreturn WITH KEY type = 'W'.
      IF sy-subrc <> 0.
        EXPHEADER = POHEADER.
        EXPHEADER-CODE = '99'.
        SELECT max( serial_no )
        INTO L_SERIAL
        FROM ZP2P_ERRORS.
        LOOP AT T_ERRORS.
          L_SERIAL = L_SERIAL + 1.
          T_ERRORS-serial_no = L_SERIAL.
          MODIFY T_ERRORS TRANSPORTING serial_no.
        ENDLOOP.
      INSERT ZERRORS FROM TABLE T_ERRORS.
        INSERT ZP2P_ERRORS FROM TABLE T_ERRORS.
**MOD-005
On Error, exit the function module
       l_exit = 0.
       LOOP AT RETURN WHERE TYPE = C_E.
         L_EXIT = 1.
         EXPHEADER = POHEADER.
         EXPHEADER-CODE = '99'.
         RETURN-RETURN_CODE = C_99.
         RETURN-SEQ_CODE    = C_99.
         MODIFY RETURN TRANSPORTING RETURN_CODE SEQ_CODE.
       ENDLOOP.
       IF L_EXIT = 1.
         EXIT.
       ENDIF.
**MOD-005
        EXIT.
      ENDIF.
    ENDIF.
    PERFORM GET_INCOTERMS_LINE_ITEM  tables   poitem
                                   using    poheader.
    perform get_uom_conversion  tables poitem
                                      POITEMX
                                      poaccount
                                      poaccountx
                                      poschedule
                                      poschedulex
                                      pocond
                                      pocondx
                                      Pocondheader
                                      pocondheaderx
                             changing poheader
                                      poheaderx.
  ENDIF.
*mod-003
****BV-27-May-2004 - End of Changes for SCR2****
*sraman2 10/14/04
  IF POHEADER-PO_NUMBER(3) = C_PCO.
   DATA: l_serial_no LIKE poaccount-serial_no.
    loop at POACCOUNT.
      ADD 1 TO l_serial_no.
      POACCOUNT-SERIAL_NO = l_serial_no.
      modify POACCOUNT.
    endloop.
  endif.
*sraman2 10/14/04
  SORT POACCOUNT BY PO_ITEM.
  LOOP AT POACCOUNT.
    check poheader-quotation+0(2) ne 'CR' and
    poheader-quotation+0(2) ne 'UT'.
    IF NOT POACCOUNT-WBS_ELEMENT IS INITIAL. "line item posting to
      "WBS element
      CLEAR L_MSGV1.
      L_MSGV1 = POACCOUNT-PO_ITEM.
Mod-004
    Line Item NOT eligible for PCARD
     CALL FUNCTION 'BALW_BAPIRETURN_GET2'
          EXPORTING
               TYPE   = C_MSGTYPE_I  "I
               CL     = C_MSGID_Z001                       "Z001
               NUMBER = C_MSGNR_038  "038
               PAR1   = L_MSGV1
          IMPORTING
               RETURN = RETURN.
     APPEND RETURN.
     CLEAR  RETURN.
*mod-004
      loop at return.
        l_wa_zerrors-OBJECT     = 'PURCHASE_ORDER'.
        l_wa_zerrors-serial_no   = sy-tabix.
        l_wa_zerrors-COMP_CODE  = poheader-comp_code.
        l_wa_zerrors-zid        = return-id.
        l_wa_zerrors-type       = return-type.
        l_wa_zerrors-znumber    = return-number.
        l_wa_zerrors-BEACON_DOC_NO = poheader-po_number.
        l_wa_zerrors-SRC_DOC_NO = poheader-po_number.
        l_wa_zerrors-ZDATE      = sy-datum.
        l_wa_zerrors-ERR_MSG    = return-message.
        append l_wa_zerrors to t_errors.
      insert into zerrors values l_wa_zerrors.
        clear: l_wa_zerrors.
      endloop.
      clear: l_wa_zerrors.
    ELSE.
      IF NOT POACCOUNT-COSTCENTER IS INITIAL.
        "line item posting to cost center.
        READ TABLE POITEM WITH KEY PO_ITEM = POACCOUNT-PO_ITEM.
        IF SY-SUBRC = 0.
          IF NOT POITEM-DISTRIB IS INITIAL.
            CLEAR L_MSGV1.
            L_MSGV1 = POACCOUNT-PO_ITEM.
*Mod-004
          Line Item NOT eligible for PCAR

Similar Messages

  • How to create purchase order using VA01 for BAPI?

    how to create purchase order using VA01 for BAPI?

    Hi Arun,
    Please check this link
    Example Program for BAPI_PO_CREATE1
    Re: BAPI_PO_CREATE1
    Questions in BAPI_PO_CREATE1
    Problem with BAPI_PO_CREATE1
    *& Report BAPI_PO_CREATE *
    REPORT bapi_po_create.
    Input File Declaration
    TYPES: BEGIN OF ty_input_file,
    column1 TYPE char50,
    column2 TYPE char50,
    column3 TYPE char50,
    column4 TYPE char50,
    column5 TYPE char50,
    column6 TYPE char50,
    column7 TYPE char50,
    column8 TYPE char50,
    column9 TYPE char50,
    column10 TYPE char50,
    column11 TYPE char50,
    column12 TYPE char50,
    column13 TYPE char50,
    column14 TYPE char50,
    column15 TYPE char50,
    column16 TYPE char50,
    column17 TYPE char50,
    column18 TYPE char50,
    END OF ty_input_file.
    DATA: i_input_file TYPE STANDARD TABLE OF ty_input_file,
    wa_input_file TYPE ty_input_file.
    CONSTANTS: c_path TYPE char20 VALUE 'C:\',
    c_mask TYPE char9 VALUE ',.,..',
    c_mode TYPE char1 VALUE 'O',
    c_filetype TYPE char10 VALUE 'ASC',
    c_x TYPE char01 VALUE 'X'.
    PARAMETERS : p_fname LIKE rlgrap-filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
    Browse Presentation Server
    PERFORM f4_presentation_file.
    START-OF-SELECTION..
    Read presentation server file
    PERFORM f1003_upload_file.
    IF NOT i_input_file[] IS INITIAL.
    PERFORM split_data.
    ENDIF.
    *& Form f4_presentation_file
    *& F4 Help for presentation server
    FORM f4_presentation_file .
    CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
    def_path = c_path
    mask = c_mask
    mode = c_mode
    title = text-001
    IMPORTING
    filename = p_fname
    EXCEPTIONS
    inv_winsys = 1
    no_batch = 2
    selection_cancel = 3
    selection_error = 4
    OTHERS = 5.
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDFORM. " f4_presentation_file
    *& Form f1003_upload_file
    *& Upload File
    FORM f1003_upload_file .
    DATA: lcl_filename TYPE string.
    lcl_filename = p_fname.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = lcl_filename
    filetype = c_filetype
    has_field_separator = c_x
    TABLES
    data_tab = i_input_file
    EXCEPTIONS
    file_open_error = 1
    file_read_error = 2
    no_batch = 3
    gui_refuse_filetransfer = 4
    invalid_type = 5
    no_authority = 6
    unknown_error = 7
    bad_data_format = 8
    header_not_allowed = 9
    separator_not_allowed = 10
    header_too_long = 11
    unknown_dp_error = 12
    access_denied = 13
    dp_out_of_memory = 14
    disk_full = 15
    dp_timeout = 16
    OTHERS = 17.
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    EXIT.
    ENDIF.
    ENDFORM. " f1003_upload_file
    *& Form split_data
    Collect data for creating Purchase Order
    FORM split_data .
    DATA: i_poitem TYPE STANDARD TABLE OF bapimepoitem,
    i_poitemx TYPE STANDARD TABLE OF bapimepoitemx,
    i_poitem_sch TYPE STANDARD TABLE OF bapimeposchedule,
    i_poitem_schx TYPE STANDARD TABLE OF bapimeposchedulx,
    i_acct_*** TYPE STANDARD TABLE OF bapimepoaccount,
    i_acct_assx TYPE STANDARD TABLE OF bapimepoaccountx,
    i_services TYPE STANDARD TABLE OF bapiesllc ,
    i_srvacc TYPE STANDARD TABLE OF bapiesklc,
    i_return TYPE STANDARD TABLE OF bapiret2,
    wa_header TYPE bapimepoheader,
    wa_headerx TYPE bapimepoheaderx,
    wa_poitem TYPE bapimepoitem,
    wa_poitemx TYPE bapimepoitemx,
    wa_poitem_sch TYPE bapimeposchedule,
    wa_poitem_schx TYPE bapimeposchedulx,
    wa_acct_*** TYPE bapimepoaccount,
    wa_acct_assx TYPE bapimepoaccountx,
    wa_services TYPE bapiesllc,
    wa_srvacc TYPE bapiesklc,
    wa_return TYPE bapiret2,
    ws_po TYPE bapimepoheader-po_number.
    break gbpra8.
    wa_services-pckg_no = 10.
    wa_services-line_no = 1.
    wa_services-outl_no = '0'.
    wa_services-outl_ind = c_x.
    wa_services-subpckg_no = 20.
    APPEND wa_services TO i_services.
    wa_srvacc-pckg_no = 10.
    wa_srvacc-line_no = 1.
    wa_srvacc-serno_line = 01.
    wa_srvacc-serial_no = 01.
    wa_srvacc-percentage = 100.
    APPEND wa_srvacc TO i_srvacc.
    LOOP AT i_input_file INTO wa_input_file.
    IF wa_input_file-column2 EQ 'HD'.
    wa_header-doc_type = wa_input_file-column3.
    wa_header-creat_date = sy-datum.
    wa_header-created_by = sy-uname.
    wa_header-vendor = wa_input_file-column4.
    PERFORM conversion_output USING wa_header-vendor
    CHANGING wa_header-vendor.
    wa_header-comp_code = 'DE03'.
    wa_header-purch_org = 'DE03'.
    wa_header-pur_group = 'DE1'.
    wa_header-vper_start = wa_input_file-column9.
    wa_header-vper_end = wa_input_file-column10.
    wa_headerx-comp_code = c_x.
    wa_headerx-doc_type = c_x.
    wa_headerx-creat_date = c_x.
    wa_headerx-created_by = c_x.
    wa_headerx-vendor = c_x.
    wa_headerx-purch_org = c_x.
    wa_headerx-pur_group = c_x.
    wa_headerx-vper_start = c_x.
    wa_headerx-vper_end = c_x.
    ENDIF.
    IF wa_input_file-column2 EQ 'IT'.
    wa_poitem-po_item = wa_input_file-column3.
    wa_poitem-short_text = wa_input_file-column6.
    wa_poitem-plant = wa_input_file-column8.
    wa_poitem-quantity = '1'.
    wa_poitem-tax_code = 'V0'.
    wa_poitem-item_cat = 'D'.
    wa_poitem-acctasscat = 'K'.
    wa_poitem-matl_group = wa_input_file-column7.
    wa_poitem-pckg_no = '10'.
    APPEND wa_poitem TO i_poitem .
    wa_poitemx-po_item = wa_input_file-column3.
    wa_poitemx-po_itemx = c_x.
    wa_poitemx-short_text = c_x.
    wa_poitemx-plant = c_x.
    wa_poitemx-quantity = c_x.
    wa_poitemx-tax_code = c_x.
    wa_poitemx-item_cat = c_x.
    wa_poitemx-acctasscat = c_x.
    wa_poitemx-matl_group = c_x.
    wa_poitemx-pckg_no = c_x.
    APPEND wa_poitemx TO i_poitemx.
    wa_poitem_sch-po_item = wa_input_file-column3.
    wa_poitem_sch-delivery_date = sy-datum.
    APPEND wa_poitem_sch TO i_poitem_sch.
    wa_poitem_schx-po_item = wa_input_file-column3.
    wa_poitem_schx-po_itemx = c_x.
    wa_poitem_schx-delivery_date = c_x.
    APPEND wa_poitem_schx TO i_poitem_schx.
    wa_acct_***-po_item = 10.
    wa_acct_***-serial_no = 01.
    wa_acct_***-gl_account = '0006360100'.
    wa_acct_***-co_area = '1000'.
    wa_acct_***-costcenter = 'KC010000'.
    APPEND wa_acct_*** TO i_acct_***.
    wa_acct_***-po_item = 10.
    wa_acct_***-serial_no = 02.
    wa_acct_***-gl_account = '0006360100'.
    wa_acct_***-co_area = '1000'.
    wa_acct_***-costcenter = 'KC010000'.
    APPEND wa_acct_*** TO i_acct_***.
    wa_acct_assx-po_item = 10.
    wa_acct_assx-serial_no = 01.
    wa_acct_assx-po_itemx = c_x.
    wa_acct_assx-serial_nox = c_x.
    wa_acct_assx-gl_account = c_x.
    wa_acct_assx-co_area = c_x.
    wa_acct_assx-costcenter = c_x.
    APPEND wa_acct_assx TO i_acct_assx.
    wa_acct_assx-po_item = 10.
    wa_acct_assx-serial_no = 02.
    wa_acct_assx-po_itemx = c_x.
    wa_acct_assx-serial_nox = c_x.
    wa_acct_assx-gl_account = c_x.
    wa_acct_assx-co_area = c_x.
    wa_acct_assx-costcenter = c_x.
    APPEND wa_acct_assx TO i_acct_assx.
    wa_services-pckg_no = 20.
    wa_services-line_no = 2.
    wa_services-service = wa_input_file-column9.
    wa_services-quantity = '100'.
    wa_services-gr_price = '100'.
    wa_services-userf1_txt = wa_input_file-column13.
    APPEND wa_services TO i_services.
    wa_srvacc-pckg_no = 20.
    wa_srvacc-line_no = 1.
    wa_srvacc-serno_line = 02.
    wa_srvacc-serial_no = 02.
    wa_srvacc-percentage = 100.
    APPEND wa_srvacc TO i_srvacc.
    ENDIF.
    ENDLOOP.
    CALL FUNCTION 'BAPI_PO_CREATE1'
    EXPORTING
    poheader = wa_header
    poheaderx = wa_headerx
    POADDRVENDOR =
    TESTRUN =
    MEMORY_UNCOMPLETE =
    MEMORY_COMPLETE =
    POEXPIMPHEADER =
    POEXPIMPHEADERX =
    VERSIONS =
    NO_MESSAGING =
    NO_MESSAGE_REQ =
    NO_AUTHORITY =
    NO_PRICE_FROM_PO =
    IMPORTING
    exppurchaseorder = ws_po
    EXPHEADER =
    EXPPOEXPIMPHEADER =
    TABLES
    return = i_return
    poitem = i_poitem
    poitemx = i_poitemx
    POADDRDELIVERY =
    poschedule = i_poitem_sch
    poschedulex = i_poitem_schx
    poaccount = i_acct_***
    POACCOUNTPROFITSEGMENT =
    poaccountx = i_acct_assx
    POCONDHEADER =
    POCONDHEADERX =
    POCOND =
    POCONDX =
    POLIMITS =
    POCONTRACTLIMITS =
    poservices = i_services
    posrvaccessvalues = i_srvacc
    POSERVICESTEXT =
    EXTENSIONIN =
    EXTENSIONOUT =
    POEXPIMPITEM =
    POEXPIMPITEMX =
    POTEXTHEADER =
    POTEXTITEM =
    ALLVERSIONS =
    POPARTNER =
    break gbpra8.
    LOOP AT i_return INTO wa_return.
    ENDLOOP.
    ENDFORM. " split_data
    *& Form conversion_output
    Conversion exit input
    FORM conversion_output USING p_ip
    CHANGING p_op.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = p_ip
    IMPORTING
    output = p_op.
    ENDFORM. " conversion_output
    Best regards,
    raam

  • Hi Experts, a questions about using BAPI_PO_CREATE1(BAPI_PO_CREATE obsolet)

    Hi Experts,
    I use BAPI_PO_CREATE1 to create a purchase order(stock transfer order - UD), but does anyone know how to assign parameters to the interface of the BAPI? but when I go to transaction ME21N I enter the purchase org, group, material number, quantity, plant, and supplying plant and I click save, then a purchase order is generated but how can I use this BAPI to generate purchase order? can anyone tell me in detail?
    thank you in advance.
    Kind regards
    Dawson

    Hi,
    Please find the code below in order to create a PO from BAPI_PO_CREATE1
    Example of population of BAPI interface in the Function Builder
    Parameter: POHEADER
    COMP_CODE = 1000
    DOC_TYPE = UB
    ITEM_INTVL = 00001
    VENDOR = 0000001000
    PMNTTRMS = 0001
    PURCH_ORG = 1000
    PUR_GROUP = 001
    CURRENCY = EUR
    Parameter: POHEADERX
    COMP_CODE = X
    DOC_TYPE = X
    ITEM_INTVL = X
    VENDOR = X
    PMNTTRMS = X
    PURCH_ORG = X
    PUR_GROUP = X
    Parameter: POITEM
    PO_ITEM = 00001
    MATERIAL = 100-100
    PLANT = 1000
    STGE_LOC = 0001
    QUANTITY = 15.000
    TAX_CODE = V0
    ITEM_CAT = 0
    ACCTASSCAT = K
    Parameter: POITEMX
    PO_ITEM = 00001
    MATERIAL = X
    PLANT = X
    STGE_LOC = X
    QUANTITY = X
    TAX_CODE = X
    ITEM_CAT = X
    ACCTASSCAT = X
    Parameter: POSCHEDULE
    PO_ITEM = 00001
    SCHED_LINE = 0001
    DELIVERY_DATE = 02.12.2002
    QUANTITY = 6.000
    PO_ITEM = 00001
    SCHED_LINE = 0002
    DELIVERY_DATE = 03.12.2002
    QUANTITY = 5.000
    PO_ITEM = 00001
    SCHED_LINE = 0003
    DELIVERY_DATE = 04.12.2002
    QUANTITY = 4.000
    Parameter: POSCHEDULEX
    PO_ITEM = 00001
    SCHED_LINE = 0001
    PO_ITEMX = X
    SCHED_LINEX = X
    DELIVERY_DATE = X
    QUANTITY = X
    PO_ITEM = 00001
    SCHED_LINE = 0002
    PO_ITEMX = X
    SCHED_LINEX = X
    DELIVERY_DATE = X
    QUANTITY = X
    PO_ITEM = 00001
    SCHED_LINE = 0003
    PO_ITEMX = X
    SCHED_LINEX = X
    DELIVERY_DATE = X
    QUANTITY = X
    Parameter: POACCOUNT
    PO_ITEM = 00001
    SERIAL_NO = 01
    QUANTITY = 15.000
    GL_ACCOUNT = 0000400000
    COSTCENTER = 0000001000
    CO_AREA = 1000
    Parameter: POACCOUNTX
    PO_ITEM = 00001
    SERIAL_NO = 01
    QUANTITY = X
    GL_ACCOUNT = X
    COSTCENTER = X
    CO_AREA = X
    Parameter: POCOND
    ITM_NUMBER = 000001
    COND_ST_NO = 001
    COND_TYPE = PB00
    COND_VALUE = 79.900000000
    CURRENCY = EUR
    CURRENCY_ISO = EUR
    COND_UNIT = KG
    COND_P_UNT = 1
    CHANGE_ID = U
    Parameter: POCONDX
    ITM_NUMBER = 000001
    COND_ST_NO = 000
    ITM_NUMBERX = X
    COND_TYPE = X
    COND_VALUE = X
    CURRENCY = X
    CHANGE_ID = X
    Parameter: POPARTNER
    PARTNERDESC = OA
    LANGU = EN
    BUSPARTNO = 0000001100
    PARTNERDESC = GS
    LANGU = EN
    BUSPARTNO = 0000001200
    PARTNERDESC = PI
    LANGU = EN
    BUSPARTNO = 0000001000
    Do not forget to call BAPI_TRANSACTION_COMMIT after bapi call.
    KR Jaideep,

  • Question about unit conversion for BAPI_PO_CREATE1...

    Hello Experts,
    How do we bypass/supress the unit conversion in BAPI 'BAPI_PO_CREATE1'? Because what is happening
    right now is for example, I input in 88CV it will convert it to 'EA' as this is defined as the
    PO unit of measure. I want the 88 CV to be as it is.
    Also, I am manually populating the net price(net_price) with my own value as I do not want to get
    the net price from the info record. But it comes back as 0. I populate the 'X' fields as to let you know.

    This conversion takes place due to SPRO setting
    ask your functional people to do that
    goo SPRO->reference img->sap netweaveer->check units of measurement
    cheers
    s.janagar

  • BAPI_PO_CREATE1 in background

    Hi,
    How to suppress the E and A type messages from BAPI_PO_CREATE1 in the background to avoid that messages in Job log?
    Ie. I want to avoid those messages which is automatically written to Job log in background mode.
    I will process the return table and then will write the relevant messages to the job log.
    Can anyone help?
    Deepu

    What currently happening is i have used this BAPI_PO_CREATE1 in one program.
    We can excecute the program either in foreground or background.
    In foreground the errors are written to a list.<b>--->good</b>
    In backgroung the errors are written to the Job log from the program, but what is actually happening is from BAPI_PO_CREATE1 all the E and A type messages are automatically logged into Job log and I wanted to avoid that.--->u can skip if it is back ground
    <b>if sy-batch = 'X'.
    dont display errors.
    else.
    errors.
    endif.</b>
    I will write the error log depending on my requirement.
    now irrespective of my error log some other messages are also comming in the error log from BAPI_PO_CREATE1 in background.
    I wanted to avoid those messages populating from the BAPI in the background.
    <b>But question is : how to u come to know which records got uploaded into SAP ? how to u recorrect errrors?</b>
    Regards
    Prabhu

  • Bapi_po_create1  error--service PO

    We are upgradeing to ECC6 and we have a program that is currently working in our old system using bapi_po_create1 to create service PO's.
    We are getting an account assignment error in the ECC6system, "In case of account assignment, please enter acc. assignment data for item"
    Entering manually works but I can't find out what has changed to correct the bapi.
    Any ideas or does someone have an example of a service entry.
    Thanks
    Julie

    Hi Julie,
    please check the following:
    The package number should be set according to FAQ note 499626,    
    question 8.                                                       
    POITEMX: if there are also fields filled with an X, which were NOT                
    filled in the POITEM structure, please remove those X entries.                                                                               
    If a field in POITEMX is marked 'X', it means that the corresponding           
    field in POITEM has a value.                                                   
    Similar is the case for POACCOUNT and POACCOUNTX.  
    Please check the FAQ note 420332 about how to fill the data structure correctly for service POs. In most of the cases the error message 06 436 disappeared after the data structures were set up correctly.   
    Please check / and if needed implement also the note 1236355
    Regards,
    Edit

  • PO created via BAPI_PO_CREATE1 with status 'On HOLD' issue

    Dear experts,
    We are using BAPI_PO_CREATE1 to create a service
    purchase order, PO is created successfully but it is on Hold.
    So, we must save this PO via ME22N manually again.
    In EKKO, this on hold PO has the field MEMORY set to "X",
    MEMORYTYPE set to "H".
    We checked the include 'L2012F47', found a BADI:
    CL_EXM_IM_ME_BAPI_PO_CUST
    Example Implementation for BAdI ME_BAPI_PO_CUST.
    METHOD:
    IF_EX_ME_BAPI_PO_CREATE_02~INBOUND
    METHOD if_ex_me_bapi_po_create_02~inbound.
    * distinguish between BAPI_PO_CREATE1 and
    BAPI_PO_CHANGE
      IF im_aktyp EQ cl_mmpur_constants=>hin.
    "BAPI_PO_CREATE1
        IF NOT ch_poheader-vendor IS INITIAL.
    * hold PO without error====>WHY???
          ch_memory_complete = cl_mmpur_constants=>yes.
    * do not perform application authority check
          ch_no_authority = cl_mmpur_constants=>yes.
        ENDIF.
      ELSEIF im_aktyp EQ cl_mmpur_constants=>ver.
    "BAPI_PO_CHANGE
    * clear version management data
        CLEAR ch_versions.
      ENDIF.
    ENDMETHOD.
    The question is if we pass a vendor to this BAPI,
    the created purchase order will be hold due to the code
    above will set the ch_memory_complete to 'X'.
    Which means the purchase order will be created but
    on hold.
    Could you give us a hint on why purchase order will be
    hold while a vendor is passed in the BAPI?
    Thanks for your kindly help.
    Best Regards,
    Eason Ling

    Hi Mallinath,
    We didn't set MEMORY_COMPLETE when calling the BAPI_PO_CREATE1, which means in BAPI_PO_CREATE1 the MEMORY_COMPLETE is ' ', according to NOTE 354771, the purchase order will be saved instead of being held. What's more, our service purchase order is a correct and complete one.
    Documentation for the fields:
    MEMORY_COMPLETE:
    You can use this parameter to control whether a CORRECT and complete purchase order is held or
    saved.
               If the value of this parameter is 'X', then the purchase order is held.
               If the value of this parameter is ' ', then the purchase order is saved.<<<<<<<<
    MEMORY_UNCOMPLETE:
    You can use this parameter to define whether an INCORRECT or incomplete purchase order is to be held.
               If the value of the parameter is 'X', then the purchase order is held.
               If the value of the parameter is ' ', then the purchase order NOT is created.
    As what i described previously, even we set MEMORY_COMPLETE to ' ' when calling the BAPI_PO_CREATE1,these codes listed below will also set MEMORY_COMPLETE to 'X'.
      IF NOT ch_poheader-vendor IS INITIAL.
    * hold PO without error
          ch_memory_complete = cl_mmpur_constants=>yes.
    * do not perform application authority check
          ch_no_authority = cl_mmpur_constants=>yes.
        ENDIF.
    Then in INCLUDE 'L2012F26', line 233(listed below), the code logic will determine if the Purchase order be held or saved.
    * docu:
    * docu: check document
    * check if memory flag can be set
        lcl_memory=>process(                                          "Park&Hold
                       EXPORTING im_po                = ch_po
                                 im_memory_complete   = ch_memory_complete<<<<<<<<<<
                                 im_memory_uncomplete = ch_memory_uncomplete
                       IMPORTING ex_save              = lf_save
                                 ex_memory            = lf_memory
                                 ex_memorytype        = lf_memorytype
                       CHANGING  ch_park_complete     = ch_park_complete
                                 ch_park_uncomplete   = ch_park_uncomplete ).
    All above is a standard logic, if we maintained a vendor for this purchase order, the order will be held. But if we don't assgin a vendor to this purchase order, when calling the BAPI, an error message will pop-up...
    Am i right?
    Best regards,
    Eason

  • BAPIEKPOC-PO_PRICE (BAPI_PO_CREATE), ME21n, and BAPI_PO_CREATE1 ?????

    In the item table passed to BAPI_PO_CREATE, there is a column called PO_PRICE in the structure PAPIEKPOC.  An "X" in this field tells the system not to step on the PR price with the PIR price.
    So first question: is thre an equivalent of this field in BAPI_PO_CREATE1, either in the BAPIMEPOITEM structure or somewhere else ????
    And second question, where in IMG/SPRO do you configure the online transaction ME21N so that it doesn't step on the PR price with the PIR price?  (I'm assuming there's got to be a way to do this, if the BAPI can be configured.)

    Okay,
    David,
    Just refer below two links hope it will help you enough
    http://sap.ittoolbox.com/groups/technical-functional/sap-log-mm/valuation-price-in-po-1425092?cv=expanded
    http://kowboyz.blogspot.com/2008/05/copy-price-from-pr-to-po.html
    Edited by: Amit Gujargoud on Nov 6, 2008 8:01 PM

  • Submit new Item Conditions via Function Module BAPI_PO_CREATE1

    Hi all,
    I have problems using FM BAPI_PO_CREATE1.
    I want to transfer Item conditions via FM, but I am not able to change the netprice via FM, my Conditions are not displayed within the Item (only netprice of Item is displayed).
    I create POs out of a SRM System via FM BBP_PO_INBOUND (which calls BAPI_PO_CREATE1).
    My question:
    Has anyone an example how to fill in data within table POCOND so that my PO item contains for example a gross price and a rebate.
    I am stucked, I can´t find the solution to create item conditions via FM BAPI_PO_CREATE1.
    Any examples?
    Thanks a lot
    Regards
    Andreas

    Problem resolved
    I used the FBGENDAT param in R/3 system to generate test data automatically, compare the data and finally I found my error.
    --> OSS note 539978
    Regards
    Andreas

  • Bapi_PO_Create1 having some problem with POCOND

    Hello All,
       i am using the bapi_po_create1.. i have created PO's from PR's now i have to also add a pricing condition type for Freight. the problem i am having is that i build the data into POCOND and POCONDX for the fields :
    fs_pocond-itm_number        = '000001'.
      fs_pocond-cond_st_no        = '001'.
      fs_pocond-cond_type         = 'FRB1'.
      fs_pocond-cond_value        = '234.56'.
      fs_pocond-currency          = 'USD'.
      fs_pocondx-itm_number       = 'X'.
      fs_pocondx-cond_st_no       = 'X'.
      fs_pocondx-cond_type        = 'X'.
      fs_pocondx-cond_value       = 'X'.
      fs_pocondx-currency         = 'X'.
    But when i check the newly Created PO. In the Detail for Conditions the new FRB1 line item is not there , any ideas on what is going wrong ?
                  thanks Scott

    Well Scott, I am on HR implementation and I don’t have other system available, so I was just trying to give you some clue . I just saw another not which explain the same what you have mentioned in your question.
    Check out this note # 580225
    you can also see the patches and package in your system using TR.SPAM
    <b>FYI..</b>
    When you create a purchase order, values I, U and D refer to the conditionsthat were derived automatically, that is, you can also use U and D already during the creation. When you change a purchase order, they also refer to existing conditions.
    Prerequisite
    You must implement Note 494759 in your system to use these functions.
    Example A: CHANGE_ID = 'I'
    You create a purchase order with BAPI_PO_CREATE1. The system shoulddetermine the conditions for item 10 automatically. In addition, however, you want to calculate 3 % freight costs. You use condition type FRA1 for the freight costs. Then tables POCOND and POCONDX must be filled with the following values:
               POCOND-ITM_NUMBER = 10 (item number)
               POCOND-COND_TYPE = FRA1 (condition type)
               POCOND-COND_VALUE = 3.0 (condition value)
               POCOND-CURRENCY = %
               POCOND-CHANGE_ID = I
               POCONDX-ITM_NUMBER = 10
               POCONDX-ITM_NUMBERX = X
               POCONDX-COND_TYPE = X
               POCONDX-COND_VALUE = X
               POCONDX-CURRENCY = X
               POCONDX-CHANGE_ID = X
    Example B: CHANGE_ID = 'U'
    You create a purchase order with BAPI_PO_CREATE1. The system determines a price (condition type PB00) of 90 EUR for item 10. You want to change the 90 EUR to 100 EUR. To do this, fill tables POCOND and POCONDX with the following values:
               POCOND-ITM_NUMBER = 10
               POCOND-COND_TYPE = PB00
               POCOND-COND_VALUE = 100
               POCOND-CURRENCY = EUR
               POCOND-CHANGE_ID = U
               POCONDX-ITM_NUMBER = 10
               POCONDX-ITM_NUMBERX = X
               POCONDX-COND_TYPE = X
               POCONDX-COND_VALUE = X
               POCONDX-CURRENCY = X
               POCONDX-CHANGE_ID = X
    Example C: CHANGE_ID = 'D'
    Now you want to use BAPI_PO_CHANGE to delete the freight costs added in example A again. To do this, fill tables POCOND and POCONDX with the following values:
               POCOND-ITM_NUMBER = 10
               POCOND-COND_TYPE = FRA1
               POCOND-CHANGE_ID = D
               POCONDX-ITM_NUMBER = 10
               POCONDX-ITM_NUMBERX = X
               POCONDX-COND_TYPE = X
               POCONDX-CHANGE_ID = X
    It is not necessary to transfer additional item data. Theonlyinformation that must be transferred in addition to the condition tables is the purchase order number (PURCHASEORDER field).
    1. POCONDHEADER-CHANGE_ID
    The header conditionsaretransferred using the POCONDHEADER table. Here, the CHANGE_ID field has the same function as in the POCOND table (see above).
    Prerequisite
    You must implement Note 494759 in your system to use these functions.
    Example
    You create a purchase order with several items and want to distributethe amount 100 EUR to the items on a percentage basis. You defined condition type HB00 for this purpose. Then the POCONDHEADER and POCONDHEADERX tables must be filled as follows:
               POCONDHEADER-COND_TYPE = HB00
               POCONDHEADER-COND_VALUE = 100
               POCONDHEADER-CURRENCY = EUR
               POCONDHEADER-CHANGE_ID = I
               POCONDHEADERX-COND_TYPE = X
               POCONDHEADERX-COND_VALUE = X
               POCONDHEADERX-CURRENCY = X
               POCONDHEADERX-CHANGE_ID = X
    Thanks
    Saquib
    Message was edited by: Saquib Khan

  • Can I use the BAPI_PO_CREATE1 to create a PO with reference to a PR?

    Hi experts.
    I have a big question. I have been spend many hours in this site to find an answer about if I can use the BAPI_PO_CREATE1, to create a Purchase Order with reference to a Purchase Requisition. I could n ot find nothing about this.
    Can somebody tell me if can I use it?
    There are some threads that say "It is posible", but I would like to know the Structure name and the field name where I have to put the Purchase Requisition in the BAPI to create my PO.
    I hope that somebody can help me.
    Thanks a lot!!
    Best Regards.
    Jesus Martinez
    ABAP Developer
    Comala, Colima, Mexico

    I know this is an ancient topic, but in order to have all the necessary info together: (for everyone's future reference)
    How to create a PO with reference to a Purchase requisition which is properly released and assigned:
    Bapi_po_create1
    POHeader: document type (also POHEADERX)
    POItem : item number, plant, storage location, PR number, PR item (also POItemx)
    and that should be all! it would be useful if SAP clarified that in their documentation because this is a very common scenario...

  • Questions on Print Quote report

    Hi,
    I'm fairly new to Oracle Quoting and trying to get familiar with it. I have a few questions and would appreciate if anyone answers them
    1) We have a requirement to customize the Print Quote report. I searched these forums and found that this report can be defined either as a XML Publisher report or an Oracle Reports report depending on a profile option. Can you please let me know what the name of the profile option is?
    2) When I select the 'Print Quote' option from the Actions drop down in the quoting page and click Submit I get the report printed and see the following URL in my browser.
    http://<host>:<port>/dev60cgi/rwcgi60?PROJ03_APPS+report=/proj3/app/appltop/aso/11.5.0/reports/US/ASOPQTEL.rdf+DESTYPE=CACHE+P_TCK_ID=23731428+P_EXECUTABLE=N+P_SHOW_CHARGES=N+P_SHOW_CATG_TOT=N+P_SHOW_PRICE_ADJ=Y+P_SESSION_ID=c-RAuP8LOvdnv30grRzKqUQs:S+P_SHOW_HDR_ATTACH=N+P_SHOW_LINE_ATTACH=N+P_SHOW_HDR_SALESUPP=N+P_SHOW_LN_SALESUPP=N+TOLERANCE=0+DESFORMAT=RTF+DESNAME=Quote.rtf
    Does it mean that the profile in our case is set to call the rdf since it has reference to ASOPQTEL.rdf in the above url?
    3) When you click on submit button do we have something like this in the jsp code: On click call ASOPQTEL.rdf. Is the report called using a concurrent program? I want to know how the report is getting invoked?
    4) If we want to customize the jsp pages can you please let me know the steps involved in making the customizations and testing them.
    Thanks and Appreciate your patience
    -PC

    1) We have a requirement to customize the Print Quote report. I searched these forums and found that this report can be defined either as a XML Publisher report or an Oracle Reports report depending on a profile option. Can you please let me know what the name of the profile option is?
    I think I posted it in one of the threads2) When I select the 'Print Quote' option from the Actions drop down in the quoting page and click Submit I get the report printed and see the following URL in my browser.
    http://<host>:<port>/dev60cgi/rwcgi60?PROJ03_APPS+report=/proj3/app/appltop/aso/11.5.0/reports/US/ASOPQTEL.rdf+DESTYPE=CACHE+P_TCK_ID=23731428+P_EXECUTABLE=N+P_SHOW_CHARGES=N+P_SHOW_CATG_TOT=N+P_SHOW_PRICE_ADJ=Y+P_SESSION_ID=c-RAuP8LOvdnv30grRzKqUQs:S+P_SHOW_HDR_ATTACH=N+P_SHOW_LINE_ATTACH=N+P_SHOW_HDR_SALESUPP=N+P_SHOW_LN_SALESUPP=N+TOLERANCE=0+DESFORMAT=RTF+DESNAME=Quote.rtf
    Does it mean that the profile in our case is set to call the rdf since it has reference to ASOPQTEL.rdf in the above url?
    Yes, your understanding is correct.3) When you click on submit button do we have something like this in the jsp code: On click call ASOPQTEL.rdf. Is the report called using a concurrent program? I want to know how the report is getting invoked?
    No, there is no conc program getting called, you can directly call a report in a browser window, Oracle reports server will execute the report and send the HTTP response to the browser.4) If we want to customize the jsp pages can you please let me know the steps involved in making the customizations and testing them.
    This is detailed in many threads.Thanks
    Tapash

  • Satellite P300D-10v - Question about warranty

    HI EVERYBODY
    I have these overheating problems with my laptop Satellite P300D-10v.
    I did everything I could do to fix it without any success..
    I get the latest update of the bios from Toshiba. I cleaned my lap with compressed air first and then disassembled it all and cleaned it better.(it was really clean insight though...)
    BUT unfortunately the problem still exists...
    So i made a research on the internet and I found out that most of Toshiba owners have the same exactly problem with their laptop.
    Well i guess this is a Toshiba bug for many years now.
    Its a really nice lap, cool sound (the best in laptop ever) BUT......
    So I wanted to make a question. As i am still under warranty, can i return this laptop and get my money back or change it with a different one????
    If any body knows PLS let me know.
    chears
    Thanks in advance

    Hi
    I have already found you other threads.
    Regarding the warranty question;
    If there is something wrong with the hardware then the ASP in your country should be able to help you.
    The warranty should cover every reparation or replacement.
    But I read that you have disasembled the laptop at your own hand... hmmm if you have disasembled the notebook then your warrany is not valid anymore :(
    I think this should be clear for you that you can lose the warrany if you disasemble the laptop!
    By the way: you have to speak with the notebook dealer where you have purchased this notebook if you want to return the notebook
    The Toshiba ASP can repair and fix the notebook but you will not get money from ASP.
    Greets

  • Question regarding NULL and forms

    Hi all, i have a survey that im working on that will be sent via email.
    I'm having an issue though. if i have a multiple choice question, and the user only selects one of the choices, all the unselected choices return as NULL. is there a way i can filter out anytihng that says "NULL" so it only shows the selected options?
    thanks.
    here is the page that retrieves all the data. thanks
    <body>
    <p>1) Is this your first visit to xxxxxxx? <b><%=request.getParameter("stepone") %></b>
    </p>
    <p> </p>
    <p>2) How did You Learn About xxxxxxx?</p>
    <p><b><%=request.getParameter("steptwoOne") %></b>
      <br>
        <b><%=request.getParameter("steptwoTwo") %></b>
      <br>
        <b><%=request.getParameter("steptwoThree") %></b>
      <br>
        <b><%=request.getParameter("steptwoFour") %></b>
      <br>
        <b><%=request.getParameter("steptwoOther") %></b>
    </p>
    <p> </p>
    <p>3) What was your main reason for visiting xxxxx?</p>
    <p><b><%=request.getParameter("stepthreeOne") %></b>
        <br>
          <b><%=request.getParameter("stepthreeTwo") %></b>
        <br>
          <b><%=request.getParameter("stepthreeThree") %></b>
        <br>
          <b><%=request.getParameter("stepthreeFour") %></b>
        <br>
          <b><%=request.getParameter("stepthreeOther") %></b>
    </p>
    <p>4) did you find the information you were looking for on this site?</p>
    <p><b><%=request.getParameter("stepfour") %>
    <br>
    <b><%=request.getParameter("stepfourOther") %></b>
    </b></p>
    <p>5) Do you plan on using this website in the future?</p>
    <p><b><%=request.getParameter("stepfive") %></b></p>
    <p>6) What is your gender</p>
    <p><b><%=request.getParameter("stepsix") %></b></p>
    <p>7) What is your age group</p>
    <p><b><%=request.getParameter("stepseven") %></b></p>
    8) Would you like to take a moment and tell us how we can improve your experience on xxxxxxxxxx?
    <p><b><%=request.getParameter("stepeightFeedback") %></b></p>

    i was messing around and came up with this. it doesnt remove the null, but if it is null it adds ABC beside it. so i think i might be getting close. i just need to figure out how to replace the null.
    code]
    <b><%=request.getParameter("steptwoFour") %></b>
         <% if (request.getParameter("steptwoFour") == null ) {
         %>
         <% out.print("abc"); %>
         <% }
         %>

  • Anyone know how to remove Overdrive books from my iphone that have been transferred from my computer? They do not show up on itunes. I see a lot of answers to this question but they all are based on being able to see the books in iTunes.

    How do I remove Overdrive books from the library that were downloaded onto my computer then transferred to my iphone? The problem is that they do not show up in iTunes.
    I see this question asked a lot when I google, but they always give answers that assumes you can find the books in iTunes either under the books tab, or the audio books tab or in the music. They do not show up anywhere for me. They do not remove from the app like the ones I downloaded directly onto my iphone.the related archived article does not answer it either.  I even asked a guy working at an apple store and he could not help either.   Anybody...?
    Thanks!

    there is an app called daisydisk on mac app store which will help you see exactly where the memory is focused and consumed try using that app and see which folders are using more memory

Maybe you are looking for