CALL FUNCTION 'BAPI_PO_CREATE1' EXPORTING poheader = poheader poheaderx = poheaderx* POADDRVENDOR = testrun = 'X'* MEMORY_UNCOMPLETE =* MEMORY_COMPLETE =* POEXPIMPHEADER =* POEXPIMPHEADERX =* VERSIONS =* NO_MESSAGING =* NO_MESSAGE_REQ =* NO_AUTHORITY = no_price_from_po = 'X' IMPORTING exppurchaseorder = epo* EXPHEADER =* EXPPOEXPIMPHEADER = TABLES return = return poitem = poitem[] poitemx = poitemx[]* POADDRDELIVERY = poschedule = poschedule[] poschedulex = poschedulex[] poaccount = poaccount[]"CRQ000000016532* POACCOUNTPROFITSEGMENT = poaccountx = poaccountx[]* POCONDHEADER =* POCONDHEADERX = pocond = pocond[] pocondx = pocondx[].* POLIMITS =* POCONTRACTLIMITS =* POSERVICES =* POSRVACCESSVALUES =* POSERVICESTEXT =* EXTENSIONIN =* EXTENSIONOUT =* POEXPIMPITEM =* POEXPIMPITEMX =* POTEXTHEADER =* POTEXTITEM =* ALLVERSIONS =* POPARTNER =* POCOMPONENTS =* POCOMPONENTSX =* POSHIPPING =* POSHIPPINGX =* POSHIPPINGEXP = LOOP AT return INTO wa_return WHERE type EQ 'E' OR type EQ 'A'. lw_flag = 'X'. EXIT. ENDLOOP. IF lw_flag <> 'X'. CALL FUNCTION'BAPI_TRANSACTION_COMMIT'. gt_so-status = icon_green_light. gt_so-type = 'S'. gt_so-data_ck = '模拟导入成功'. MODIFY gt_so[] FROM gt_so TRANSPORTING status type data_ck WHERE sel = p_sel. gs_succ-poheader = lw_poheader. gs_succ-poheaderx = lw_poheaderx. gs_succ-poitem[] = gt_poitem[]. gs_succ-poitemx[] = gt_poitemx[]. gs_succ-poschedule[] = gt_poschedule[]. gs_succ-poschedulex[] = gt_poschedulex[]. gs_succ-pocond[] = gt_pocond[]. gs_succ-pocondx[] = gt_pocondx[]. gs_succ-poaccount[] = gt_poaccount[]."CRQ000000016532 gs_succ-poaccountx[] = gt_poaccountx[]. gs_succ-sel = p_sel. APPEND gs_succ TO gt_succ. ELSE. CALL FUNCTION'BAPI_TRANSACTION_ROLLBACK'.