How to post or use fi upload bapis
hi everybody,
this is giri i need some help in bapis upload report. its related to fi module, here i have given details regarding this below. in how to pass data to bapi i dont know .and this bapi containig idoc segenets like IDOC Segment - BAPIACHE08,IDOC Segment - BAPIACAR09 and IDOC Segment - BAPIACGL08.
the main use of this program is it take flat file from application or presentation server and then post thru bapi function module, can i use above idoc structures or seperately i can build a structure.pls its urgent req.
some details abt this:
The program should be able to generate postings in FI AR in the specific company code similar to the postings generated using standard SAP transaction code F-22 (Invoice) or F-27 (Credit Memo) or an on account AR payment posting.The above transactions are the online transactional equivalent of this interface. In order to accommodate the volume, standard SAP delivered BAPI Z_BAPI_ACC_DOCUMENT_POST that corresponds to these transactions will be utilized.
Hi Kamal Shaik,
YES.
If new GL is active, all standard FI functions and transactions will populate the FAGLFLEX tables.
For this purpose, all standard modules use
CALL FUNCTION 'FAGL_CHECK_GLFLEX_ACTIVE'
IMPORTING
e_glflex_active = gv_newgl_active.
to decide what tables are relevant.
We used FUNCTION 'BAPI_ACC_GL_POSTING_POST' for posting successfully including FAGLFLEXT update.
Regards,
Clemens
Similar Messages
-
Hi,
I want to post asset together with expense into one document. The first approach is to use BAPI_ACC_DOCUMENT_POST with custom obj_type, like ZBKPF. But when we post using the custom obj_type, we cannot reverse the document using FB08.
Is that anyway we can post using BAPI_ACC_DOCUMENT_POST and reverse using FB08?
Or is that any BAPI that can do this?
Thanks,
Tai
Edited by: Tai Pang Ng on Apr 8, 2011 9:37 PMIt is because I want to post asset. I tried to post my asset without specified the obj_type and acc_type, then I got an error saying cannot direct post thru my GL account. That's true becuase posting asset, we just use asset number and reconciliation GL.
Then I tried to put my asset no in GL field, then I got another error saying the GL is not in Chart of Account, and that's true also becuase the asset no is never config in our chart of account.
Then I found out that I had to specified the acct_type to 'A'. After that, I got another error saying RFBURFBU000000000000 is not define. That's I cannot post this thru obj_type RBFU. After checking that, I had to specified bus_act to RMWE and custom obj_type to some Z value to make it go.
But after all these, I cannot reverse my posting using FB08 anymore because this is an custom obj_type and not allow to reverse using FB08.
Please let me know if I made mistake in the above.
Thanks,
Tai -
How to post Intercompany GL using BAPI
Hello Experts,
We have a requirement for Intercompany GL posting , we are using BAPI_ACC_DOCUMENT_POST for standard posting but looks like it does not work with intercompany posting.
Can anyone let me know how to post Intercompany GL either using BAPI_ACC_DOCUMENT_POST or any other method.
Thanks
ShramanHi Shraman,
For a requirement for Intercompany GL posting, use BAPI_ACC_DOCUMENT_POST for standard posting with some advanced parameters
In Header of the BAPI, pass the hardcoded values like
DOCUMENTHEADER
OBJ_TYPE = FKKSU
OBJ_KEY = $
OBJ_SYS = System name
BUS_ACT = RFBU
Other parameters you can pass in Header is:
USERNAME
HEADER_TXT
COMP_CODE
DOC_DATE
PSTNG_DATE
TRANS_DATE
FISC_YEAR
FIS_PERIOD
DOC_TYPE
REF_DOC_NO
If you are posting a document in cross-companies 1000 & 1001, you need to pass cost-center with the line item. That is the mandatory field.
Thanks,
Guru -
How to post invoice parked using BAPI- BAPI_INCOMINGINVOICE_CREATE
Hi all,
Can anybody help me with the following scenario:
I am parking Invoice document using BAPI: <b>BAPI_INCOMINGINVOICE_PARK</b>. It gives me a document no. which I can see in frontend system also by committing the BAPI.
But when I try to post the same using BAPI: <b>BAPI_INCOMINGINVOICE_CREATE</b> , It gives me a different document no.
Means it is not posting the document which has been parked earlier but it is creating totally a new document. Can anybody tell me using BAPIs how to post the same document that I had parked using BAPI: <b>BAPI_INCOMINGINVOICE_PARK</b>??
Thanks
SaurabhHi Shraman,
For a requirement for Intercompany GL posting, use BAPI_ACC_DOCUMENT_POST for standard posting with some advanced parameters
In Header of the BAPI, pass the hardcoded values like
DOCUMENTHEADER
OBJ_TYPE = FKKSU
OBJ_KEY = $
OBJ_SYS = System name
BUS_ACT = RFBU
Other parameters you can pass in Header is:
USERNAME
HEADER_TXT
COMP_CODE
DOC_DATE
PSTNG_DATE
TRANS_DATE
FISC_YEAR
FIS_PERIOD
DOC_TYPE
REF_DOC_NO
If you are posting a document in cross-companies 1000 & 1001, you need to pass cost-center with the line item. That is the mandatory field.
Thanks,
Guru -
Please provide me how change the Materil using BAPI...?
Hi Guru's,
could please provide me how change the Materil using BAPI...
please provide the BPAI name and step by step process...
if ou provide any program logic that would be helpfull to me...
thanks in advance
Srinivas....Hi,
THis is code .
*& Report Zs_MATMAS_BAPI
*& This program demonstrates how easy it is to create Material master
*& data using BAPI_MATERIAL_SAVEDATA
*& The program also generates a report post-execution displaying errors
*& as well as successful uploads
REPORT Zs_MATMAS_BAPI.
TABLES
FLAGS *
DATA: F_STOP. " Flag used to stop processing
DATA DECLARATIONS *
DATA : V_EMPTY TYPE I, " No. of empty records
V_TOTAL TYPE I. " Total no. of records.
STRUCTURES & INTERNAL TABLES
*BAPI structures
DATA: BAPI_HEAD LIKE BAPIMATHEAD, " Header Segment with Control Information
BAPI_MAKT LIKE BAPI_MAKT, " Material Description
BAPI_MARA1 LIKE BAPI_MARA, " Client Data
BAPI_MARAX LIKE BAPI_MARAX, " Checkbox Structure for BAPI_MARA
BAPI_MARC1 LIKE BAPI_MARC, " Plant View
BAPI_MARCX LIKE BAPI_MARCX, " Checkbox Structure for BAPI_MARC
BAPI_MBEW1 LIKE BAPI_MBEW, " Accounting View
BAPI_MBEWX LIKE BAPI_MBEWX, " Checkbox Structure for BAPI_MBEW
BAPI_RETURN LIKE BAPIRET2. " Return Parameter
*--- Internal table to hold excel file data
DATA: IT_INTERN TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
*--- Internal table to hold Matetrial descriptions
DATA: BEGIN OF IT_MAKT OCCURS 100.
INCLUDE STRUCTURE BAPI_MAKT.
DATA: END OF IT_MAKT.
*--- Internal to hold the records in the text file
DATA : BEGIN OF IT_DATA OCCURS 100,
WERKS(4), " Plant
MTART(4), " Material type
MATNR(18), " Material number
MATKL(9) , " Material group
MBRSH(1), " Industry sector
MEINS(3), " Base unit of measure
GEWEI(3), " Weight Unit
SPART(2), " Division
EKGRP(3), " Purchasing group
VPRSV(1), " Price control indicator
STPRS(12), " Standard price
PEINH(3), " Price unit
SPRAS(2), " Language key
MAKTX(40), " Material description
END OF IT_DATA.
SELECTION SCREEN. *
SELECTION-SCREEN BEGIN OF BLOCK SCR1 WITH FRAME TITLE TEXT-111.
PARAMETER : P_FILE TYPE RLGRAP-FILENAME OBLIGATORY DEFAULT " Input File
'C:\Material_master.XLS'.
PARAMETER : P_MAX(4) OBLIGATORY DEFAULT '100'. " no.of recs in a session
PARAMETERS: P_HEADER TYPE I DEFAULT 0. " Header Lines
PARAMETERS: P_BEGCOL TYPE I DEFAULT 1 NO-DISPLAY,
P_BEGROW TYPE I DEFAULT 1 NO-DISPLAY,
P_ENDCOL TYPE I DEFAULT 100 NO-DISPLAY,
P_ENDROW TYPE I DEFAULT 32000 NO-DISPLAY.
SELECTION-SCREEN END OF BLOCK SCR1.
AT SELECTION-SCREEN *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
*--- Validating file
PERFORM VALIDATE_FILE USING P_FILE.
START-OF-SELECTION
START-OF-SELECTION.
*--- Perform to convert the Excel data into an internal table
PERFORM CONVERT_XLS_ITAB.
IF NOT IT_DATA[] IS INITIAL.
*--- Perform to delete Header lines
PERFORM DELETE_HEADER_EMPTY_RECS.
ENDIF.
END OF SELECTION. *
END-OF-SELECTION.
*--- Perform to upload Material Master data
PERFORM UPLOAD_MATMAS.
Form : validate_input_file
Description : To provide F4 help for file if read from PC
FORM VALIDATE_FILE USING F_FILE TYPE RLGRAP-FILENAME.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
CHANGING
FILE_NAME = F_FILE
EXCEPTIONS
MASK_TOO_LONG = 1
OTHERS = 2.
IF SY-SUBRC 0.
MESSAGE S010(ZLKPL_MSGCLASS). " 'Error in getting filename'.
ENDIF.
ENDFORM. " validate_input_file
*& Form CONVER_XLS_ITAB
text
FORM CONVERT_XLS_ITAB.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = P_FILE
I_BEGIN_COL = P_BEGCOL
I_BEGIN_ROW = P_BEGROW
I_END_COL = P_ENDCOL
I_END_ROW = P_ENDROW
TABLES
INTERN = IT_INTERN.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*--- Perform to move the data into an internal data
PERFORM MOVE_DATA.
ENDFORM. " CONVERT_XLS_ITAB
*& Form MOVE_DATA
text
FORM MOVE_DATA.
DATA : LV_INDEX TYPE I.
FIELD-SYMBOLS <FS>.
*--- Sorting the internal table
SORT IT_INTERN BY ROW COL.
CLEAR IT_INTERN.
LOOP AT IT_INTERN.
MOVE IT_INTERN-COL TO LV_INDEX.
*--- Assigning the each record to an internal table row
ASSIGN COMPONENT LV_INDEX OF STRUCTURE IT_DATA TO <FS>.
*--- Asigning the field value to a field symbol
MOVE IT_INTERN-VALUE TO <FS>.
AT END OF ROW.
APPEND IT_DATA.
CLEAR IT_DATA.
ENDAT.
ENDLOOP.
ENDFORM. " MOVE_DATA
*& Form DELETE_HEADER_EMPTY_RECS
To delete the Header and empty records
FORM DELETE_HEADER_EMPTY_RECS.
DATA: LV_TABIX LIKE SY-TABIX.
IF NOT P_HEADER IS INITIAL.
LOOP AT IT_DATA.
IF P_HEADER > 0 AND NOT IT_DATA IS INITIAL.
DELETE IT_DATA FROM 1 TO P_HEADER.
P_HEADER = 0.
EXIT.
ENDIF.
ENDLOOP.
ENDIF.
CLEAR IT_DATA.
*--- To delete the empty lines from internal table
LOOP AT IT_DATA.
LV_TABIX = SY-TABIX.
IF IT_DATA IS INITIAL.
V_EMPTY = V_EMPTY + 1.
DELETE IT_DATA INDEX LV_TABIX..
ENDIF.
ENDLOOP.
CLEAR IT_DATA.
*--- Total no of recs in file
DESCRIBE TABLE IT_DATA LINES V_TOTAL.
IF V_TOTAL = 0.
MESSAGE I013(ZLKPL_MSGCLASS). " No records in the file
F_STOP = 'X'.
STOP.
ENDIF.
ENDFORM. " DELETE_HEADER_EMPTY_RECS
*& Form UPLOAD_MATMAS
to upload Material Master data
FORM UPLOAD_MATMAS .
LOOP AT IT_DATA.
Header
UNPACK IT_DATA-MATNR TO IT_DATA-MATNR.
BAPI_HEAD-MATERIAL = IT_DATA-MATNR.
BAPI_HEAD-IND_SECTOR = IT_DATA-MBRSH.
BAPI_HEAD-MATL_TYPE = IT_DATA-MTART.
BAPI_HEAD-BASIC_VIEW = 'X'.
BAPI_HEAD-PURCHASE_VIEW = 'X'.
BAPI_HEAD-ACCOUNT_VIEW = 'X'.
Material Description
REFRESH IT_MAKT.
IT_MAKT-LANGU = IT_DATA-SPRAS.
IT_MAKT-MATL_DESC = IT_DATA-MAKTX.
APPEND IT_MAKT.
Client Data - Basic
BAPI_MARA1-MATL_GROUP = IT_DATA-MATKL.
BAPI_MARA1-BASE_UOM = IT_DATA-MEINS.
BAPI_MARA1-UNIT_OF_WT = IT_DATA-GEWEI.
BAPI_MARA1-DIVISION = IT_DATA-SPART.
BAPI_MARAX-MATL_GROUP = 'X'.
BAPI_MARAX-BASE_UOM = 'X'.
BAPI_MARAX-UNIT_OF_WT = 'X'.
BAPI_MARAX-DIVISION = 'X'.
Plant - Purchasing
BAPI_MARC1-PLANT = IT_DATA-WERKS.
BAPI_MARC1-PUR_GROUP = IT_DATA-EKGRP.
BAPI_MARCX-PLANT = IT_DATA-WERKS.
BAPI_MARCX-PUR_GROUP = 'X'.
Accounting
BAPI_MBEW1-VAL_AREA = IT_DATA-WERKS.
BAPI_MBEW1-PRICE_CTRL = IT_DATA-VPRSV.
BAPI_MBEW1-STD_PRICE = IT_DATA-STPRS.
BAPI_MBEW1-PRICE_UNIT = IT_DATA-PEINH.
BAPI_MBEWX-VAL_AREA = IT_DATA-WERKS.
BAPI_MBEWX-PRICE_CTRL = 'X'.
BAPI_MBEWX-STD_PRICE = 'X'.
BAPI_MBEWX-PRICE_UNIT = 'X'.
*--- BAPI to create material
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
HEADDATA = BAPI_HEAD
CLIENTDATA = BAPI_MARA1
CLIENTDATAX = BAPI_MARAX
PLANTDATA = BAPI_MARC1
PLANTDATAX = BAPI_MARCX
FORECASTPARAMETERS =
FORECASTPARAMETERSX =
PLANNINGDATA =
PLANNINGDATAX =
STORAGELOCATIONDATA =
STORAGELOCATIONDATAX =
VALUATIONDATA = BAPI_MBEW1
VALUATIONDATAX = BAPI_MBEWX
WAREHOUSENUMBERDATA =
WAREHOUSENUMBERDATAX =
SALESDATA = BAPI_MVKE1
SALESDATAX = BAPI_MVKEX
STORAGETYPEDATA =
STORAGETYPEDATAX =
IMPORTING
RETURN = BAPI_RETURN
TABLES
MATERIALDESCRIPTION = IT_MAKT
UNITSOFMEASURE =
UNITSOFMEASUREX =
INTERNATIONALARTNOS =
MATERIALLONGTEXT =
TAXCLASSIFICATIONS =
RETURNMESSAGES =
PRTDATA =
PRTDATAX =
EXTENSIONIN =
EXTENSIONINX =
IF BAPI_RETURN-TYPE = 'E'.
WRITE:/ 'Error:' ,BAPI_RETURN-MESSAGE ,'for material:' ,IT_DATA-MATNR.
ELSEIF BAPI_RETURN-TYPE = 'S'.
WRITE: 'Successfully created material' ,IT_DATA-MATNR.
ENDIF.
ENDLOOP.
ENDFORM. " UPLOAD_MATMAS
Thanks
Sarada -
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 -
Yet another 'how to pass a file as a POST HTTP parameter and upload it'
I've read a couple of threads for uploading a file with MultipartRequest or some other Apache tools, but as well as I understood, I need the HttpServletRequest request object from Servlet API. How could I upload a file without using the Servlet API, only with java.net.* classes and headers?
I have a Swing application that connects to a file hosting site written in PHP. The site has a form with a fileUpload control and a submit button. On submit, user is redirected to another page with link to the hosted site. I need to automate the process and repeatedly host multiple files. Is there an easy way to manually write a POST query or use any other jse tool?Does anybody know how to post a file using utl_http?
Thanks a lot! -
As far as I know this two bapi used to create accounting document. But how do we use them ? and what's the different between them?
The most important thing is in what condition we use which bapi to post accounting doc?
Such as there is one requirement to post accounting doc though t-code F-02 in BDC, but how do I know whether I can use this two bapi to replace the BDC?
BAPI_ACC_DOCUMENT_POST
BAPI_ACC_GL_POSTING_POSTHello,
how we use BAPI_ACC_DOCUMENT_POST:
gs_documentheader-ref_doc_no = .... your document number (from number range)
gs_documentheader-bus_act = 'RFBU'.
gs_documentheader-username = sy-uname.
gs_documentheader-header_txt = .... your header text
gs_documentheader-comp_code = '0001'.
gs_documentheader-doc_date = ..... date
gs_documentheader-pstng_date = .... date
gs_documentheader-fisc_year =.... year
gs_documentheader-fis_period = .... period
gs_documentheader-doc_type = 'BS'.
loop at ... items ... assigning <belpos_line>.
gs_accountgl-itemno_acc = <belpos_line>-posnr. "10 digits !
gs_accountgl-bus_area = ... your business area
gs_accountgl-tax_code = <belpos_line>-tax_code.
gs_accountgl-gl_account = <belpos_line>-gl_account.
gs_accountgl-comp_code = ... your company code.
gs_accountgl-alloc_nmbr = ... some identity number
gs_accountgl-item_text = .... item text
gs_accountgl-costcenter = <belpos_line>-kostl.
gs_accountgl-plant = .... werks
append gs_accountgl to gt_accountgl.
gs_currencyamount-itemno_acc = <belpos_line>-posnr.
gs_currencyamount-currency = ... waers
gs_currencyamount-amt_doccur = .... waers
append gs_currencyamount to gt_currencyamount.
endloop.
call function 'BAPI_ACC_DOCUMENT_POST'
exporting
documentheader = gs_documentheader
importing
obj_type = gd_obj_type
obj_key = gd_obj_key
obj_sys = gd_obj_sys
tables
accountgl = gt_accountgl
currencyamount = gt_currencyamount
return = gt_return.
Regards -
How to create Billing Plan in sales order using Function module /BAPI
hi,
How to create Billing Plan in sales order using Function module /BAPI
i hv check few FM such
BILLING_SCHEDULE_READ
BILLING_SCHEDULE_GET_NUMBER
BILLING_SCHEDULE_SAVE
But unable to create billing plan for a sales order.....any other method to create???Hi,
Use this link.
Create sales order with billing plan via LSMW and BAPI BUS2032
BAPI or Function to update Billing Plan in Sales Order Items
Hope this will help you.
Regards,
Vijay -
How to post the Down payment for assets using the investment measure?
Hi,
We want to post the down payment using the investment measure for some of the assets. Please tell me how to post it and how to clear it.
I have searched the net but till now I am unable to find something with which I can do that.
Thanks in advance...
Regards
NitinHi,
Please reply as I am facing problems with posting the down payments using the investment measure and I have tried and read alot but nothing as such I have been able to found.
Thanks and Reply
Nitin -
How to upload multiple files in Webdynpro using File upload Screen Element
Hi Experts,
Can anybody tell me how to upload multiple files/pdfs in webdynpro using file upload screen element, and also please tell me what is the maximum storage limit of RAWSTRING data type,Advance Thanks.
Regards,
SandeshHi Sandesh,
this is simply not supported, not in WebDynpro nor in standard HTML.
A workaround is to upload a ZIP with all files and on server side unpack the ZIP and operate on the single files.
I hope it will help u..
----------------------OR-------------------------
As you know using File upload UI element we can upload only one file at a time. There may be a scenario where user may want to upload any no of files at a time which is not determined at design time. This can be acheived using the ACF UpDownload UI element which requires a security whiltelist to be created
http://scn.sap.com/docs/DOC-2270
----------------------OR-------------------------
You can use Table UI element.
Regards,
Deepak Singh -
Reg:how to post the parked documents using BDC
Duplicate message in General deleted. Please do not post the same question in more than one forum.
Hi
I am creating parked Documents using FV50. I am able to check them using FBV0, I am able to select and post the documents using the same transaction. Its working fine. However I want to post the selected parked documents using BDC. I am having problems as the output in FBV0 is in ALV report format. HAving problems selcting the parked documents to be posted. As there any way to post the selected parked documents using BDC.
Please suggest me a solution for this.
Thanks,
Satish
Edited by: Matt on Dec 3, 2008 7:40 PMHi Rob,
Thank you for ur reply, can u send that code how u post the parked documents using BDC for FBV0 transaction. Please send the code.
Thanks,
Satish -
In warehouse management how to post stock in the warehouse by using physica
hi
in warehouse management how to post stock in the warehouse by using physical inventory method
can anyone tell me the process in detail
thanksin advance.HI ,
In Ware house management you can block the stock for Physical Inventory purpose. You cannot post the stock to the warehouse using Physical Invenory.
If there is a count going on so the concerned Warehouse bin is to be blocked during Inventory so that no further goods movement is possible during that period.
Once the Physical Inventory ids done the block can be released so that the movement can again happen.
The Inventory mangement initiates the transfer requirement. This transfer requirement is used for creating the transfer orders. The transfer order confirmation is done then which actually places the stock in the concerned bin mentioned in the order.
The stock in WM can be checked in LX24/ LX26 which is same as theat of MMBE of MM.
Hope this helps.
Regards,
Prasanna
Award pls if helpful. -
How to connect peoplesoft using bapi?
how to connect peoplesoft using bapi?
points will be awardedHi,
You can actually connect any 2 systems, if they are capable of providing and consuming web services.
If you want to connect SAP to Peoplesoft to fetch or send data, then Peoplesoft should expose these functionalities in the form of Webservice. Then you will have to create Proxy Objects in SAP by consuming these webservices (SE80). Through this proxy object you can communicate with Peoplesoft.
Thanks...
Preetham S
Message was edited by:
Preetham S -
I want to upload material master (MM01) using LSMW with BAPI method
I want to upload material master (MM01) using LSMW with BAPI method and also later on I may need to change the updated data.
Which business object and Method I should use so that i can do both.
Thanks
kumar nHi,
The business object is BUS1001.
Thanks,
Murali
Maybe you are looking for
-
Anyone know how to write to a RAW file format?
Hello, Been trying to find out if there is any way to write a RAW format file from an array containing pixel values? Do I just use a file writer and save as *.raw? Also, what information must I include beyond the pixel values? Thanks!
-
Payment popup (NEOS / Ogone ) does not appear in Safari 4.x
Dear people, We have noticed that the popups with the payment application on our website portal at portal.boip.int do not load anymore. Unfortunately, we can get no further information from Fortis Bank here in the Netherlands. They say it can be solv
-
ICloud Push in Germany available again?
The Push Service of iCloud should bei available again in Germany. But I can't get the service on my devices. Can anybody Tell me what to do? Thank you!
-
HT1550 Convert multiple mp3 and wma at once in aac
Hello All, I'm new at using iTunes, used to listen to my music in flac format with a Sandisk Sansa Clip+ (with a Rockbox rom). I've burned some of my CDs in mp3 and wma formats before burning them all again but in flac. Now with my brand new iPhone 5
-
I am quite new to Aperture, have one library with 3.500 pictures in 20 projects. When I move from project to project, I can see all the previews in the viewer, but when I click Photo to see all pictures in the browser, I can see only 2 pictures. I h