Intercompany posting issue through bapi for FB01
Hi,
I am facing an issue for intercompany document posting.
I have created a Z program in which I am using BAPI_ACC_DOCUMENT_POST for posting. The document is posted if we post within same company code. But for intercompany it gives error saying: 'G/L account XXX requires a valid tax code' even if for that account tax category is *.
Please share your valuable inputs on this issue.
Hi
The posting keys are setted by the BAPI in according to the item type (customer, vendor and G/L) and the sign of amount.
The BAPI usually uses the standard posting key: 01/11; 40/50, 21/31.
If it needs a different posting keys it needs to assign them to a certain operation key (field KOTSL): u can do it in the table T030B.
Anyway u should consider u can use the BTE RWBAPI01 in order to set own data into FI interfaces.
Max
Edited by: max bianchi on Jun 20, 2008 11:16 AM
Similar Messages
-
Hi,
I am using bapi BAPI_ACC_DOCUMENT_POST.. for FB01 but i am not getting Two fields
PstKy (Posting Key for the Next Line Item) and SGL Ind (Special G/L Indicator for the Next Line Item)
is any other bapi avilabel for this...
or please give me sample bapi for FB01 or BAPI_ACC_DOCUMENT_POST.
<removed by moderator>
Thanks.
Edited by: Mike Pokraka on Aug 4, 2008 2:40 PMHi
The posting keys are setted by the BAPI in according to the item type (customer, vendor and G/L) and the sign of amount.
The BAPI usually uses the standard posting key: 01/11; 40/50, 21/31.
If it needs a different posting keys it needs to assign them to a certain operation key (field KOTSL): u can do it in the table T030B.
Anyway u should consider u can use the BTE RWBAPI01 in order to set own data into FI interfaces.
Max
Edited by: max bianchi on Jun 20, 2008 11:16 AM -
Hi,
which is BAPI for FB01 which will help me to update following fields. like
1) Doc Date
2) Doc Type
3) company Code
4)Currency Key
5)Referen
6)Posting Key
7) G/L account
8) Speical G/L indicatior
9)Profit Center
10)Sales Doc. with sample code.
thanks.Hi,
it may help u.
BAPI for FB01
Thanks,
Sree. -
Profit Center not getting uploaded through BAPI for MM01. Pls help
Hello all,
I am getting an errror while uploading a file through BAPI for MM01 , The error says
Error:
Profit center 1000/sslcommon does not exist
for material: AC2
*& Report ZBAPI_DUMMY
REPORT ZBAPI_MM01.
*& Report ZBAPI2
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
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
BAPI_MARDL LIKE BAPI_MARD,
BAPI_MARDX LIKE BAPI_MARDX.
*--- 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
SPART(2), " Division
EKGRP(3), " Purchasing group
PRCTR(10), " Profit Center
VPRSV(1), " Price control indicator
BKLAS(4), "Valuation Class
*stprs(12), " Standard price
PEINH(3), " Price unit
SPRAS(2), " Language key
MAKTX(40), " Material description
LGORT(4) , " storage location
DISMM(2) , "MRP TYPE
VERPR(23), " Moving Average Price
MTVFP(2) , " Availability Check
DISLS(2) , "Lot Size
DISPO(3) , "MRP Controller
BESKZ(1) , "Procurment Type
FHORI(3) , "SCHEDMARGIN KEY
PERKZ(1) , "Period Indicator
END OF IT_DATA.
SELECTION SCREEN. *
SELECTION-SCREEN BEGIN OF BLOCK SCR1 WITH FRAME TITLE TEXT-111.
PARAMETER : P_FILE TYPE RLGRAP-FILENAME OBLIGATORY " Input File
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 2 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
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'.
BAPI_HEAD-storage_view ='X'.
bapi_head-mrp_view = 'X'.
bapi_head-COST_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_MARC1-PROFIT_CTR = IT_DATA-PRCTR.
BAPI_MARC1-MRP_TYPE = IT_DATA-DISMM.
BAPI_MARC1-AVAILCHECK = IT_DATA-MTVFP.
BAPI_MARC1-LOTSIZEKEY = IT_DATA-DISLS.
BAPI_MARC1-MRP_CTRLER = IT_DATA-DISPO.
BAPI_MARC1-PROC_TYPE = IT_DATA-BESKZ.
BAPI_MARC1-SM_KEY = IT_DATA-FHORI.
BAPI_MARC1-PERIOD_IND = IT_DATA-PERKZ.
BAPI_MARCX-PLANT = IT_DATA-WERKS.
BAPI_MARCX-PUR_GROUP = 'X'.
BAPI_MARCX-AVAILCHECK = 'X'.
BAPI_MARCX-PROFIT_CTR = 'X'.
BAPI_MARCX-MRP_TYPE = 'X'.
BAPI_MARCX-MRP_CTRLER = 'X'.
BAPI_MARCX-SM_KEY = 'X'.
BAPI_MARCX-LOTSIZEKEY = 'X'.
Storage Location.
BAPI_MARDL-PLANT = IT_DATA-WERKS.
BAPI_MARDL-STGE_LOC = IT_DATA-LGORT.
BAPI_MARDX-PLANT = IT_DATA-WERKS.
BAPI_MARDX-STGE_LOC = IT_DATA-LGORT.
Accounting
BAPI_MBEW1-VAL_AREA = IT_DATA-WERKS.
BAPI_MBEW1-PRICE_CTRL = IT_DATA-VPRSV.
BAPI_MBEW1-VAL_CLASS = IT_DATA-BKLAS.
BAPI_MBEW1-MOVING_PR = IT_DATA-VERPR.
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_MBEWX-MOVING_PR = '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 = BAPI_MARDL
STORAGELOCATIONDATAX = BAPI_MARDX
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'.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN = BAPI_RETURN
WRITE: 'Successfully created material' ,IT_DATA-MATNR.
ENDIF.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN = BAPI_RETURN
ENDLOOP.
ENDFORM. " UPLOAD_MATMASthe Profit center 1000/sslcommon not created. first create the profit center and then upload your data.check tcode KE52 for created profit centers...
-
Problem of BOM components uploading through BAPI,for the Network(CN01)
Hello,Friends,
Iam PP consultant and facing a problem of BOM components uploading through BAPI,for creating of the Network (CN21)
we have 300 components in the network activity and while uploading the BOM through BAPI , only 295 components has been uploaded.Others components has not uploaded.
Please suggest me what will be the Problem? and
What is the solution for the same?
Regards,
MYSin customizing availability checked has been applied ,for this reason one additional screen is appearing in BAPI for all these components
How this screen could be by passed -
Intercompany posting issue: "enter at least one item in leading company cod
hi can any one resolve this
intercompany posting issue: "enter at least one item in leading company code XXX"
i am tring to post the intercompany trasaction iu am geting the above message...........Hi,
Can you provide me OBYA settings between these two entities and posting parameters you used to get this error message ? This will help me to understand the problem better.
Best Regards,
Madhu -
What is exact BAPI for FB01 transaction......
Hi,
Currently i got requirement to upload transactional data into FB01 using BAPI. I used BAPI_acc_gl_posting_post but it applicable only for GLs, but i want to upload Vendors, Customers, assets, Materials.. Please tell me apropriate BAPI for the requirement. Its urgent.
Thanks in advance...........
Regards,
Chinna.Thanks Atish....
I have written code using BAPI_ACC_DOCUMENT_POST. But it is not posting and it is not generating Object Key...
Please go thru the code and tell the solutions....
Thanks in Advance......
REPORT zk_fi_fb01 .
Data: v_objkey(20) type c.
Data: Docheader type BAPIACHE09.
Data: ACCOUNTGL LIKE BAPIACGL09 occurs 0 with header line,
ACCOUNTRECEIVABLE like BAPIACAR09,
ACCOUNTPAYABLE like BAPIACAP09 occurs 0 with header line,
CURRENCYAMOUNT like BAPIACCR09 occurs 0 with header line,
RETURN like BAPIRET2 occurs 0.
Data: obj_typ like BAPIACHE09-OBJ_TYPE,
OBJ_KEY like BAPIACHE09-OBJ_KEY,
OBJ_SYS like BAPIACHE09-OBJ_SYS.
Data: gv_belnr type belnr_d.
Data:file_Na type String.
Data: lsys like TBDLS-LOGSYS.
*START OF SELECTION
START-OF-SELECTION.
*CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = '19'
object = 'RF_BELEG' "'FIAA-BELNR'
QUANTITY = '1'
SUBOBJECT = '7777'
TOYEAR = '2007'
IGNORE_BUFFER = ' '
IMPORTING
NUMBER = gv_belnr
QUANTITY =
RETURNCODE =
*CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
IMPORTING
OWN_LOGICAL_SYSTEM = lsys
EXCEPTIONS
OWN_LOGICAL_SYSTEM_NOT_DEFINED = 1
OTHERS = 2
*IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
*concatenate gv_belnr '7777' '2007' into v_objkey.
*Filling Document Header Details
*Docheader-OBJ_TYPE = 'BEBD'.
*Docheader-OBJ_key = V_objkey.
*Docheader-OBJ_SYS = lsys.
*docheader-BUS_ACT = 'RFBU'.
Docheader-USERNAME = sy-uname.
Docheader-COMP_CODE = '7777'.
Docheader-DOC_DATE = '20070725'.
Docheader-PSTNG_DATE = '20070725'.
Docheader-FISC_YEAR = '2007'.
*DOCHEADER-OBJ_KEY_R = 'X'.
Docheader-DOC_TYPE = 'KR'.
*Item data for ACCOUNTGL
ACCOUNTGL-ITEMNO_ACC = '0000000001'.
ACCOUNTGL-GL_ACCOUNT = '0000000102'. "99900
ACCOUNTGL-DOC_TYPE = 'KR'.
ACCOUNTGL-COMP_CODE = '7777'.
ACCOUNTGL-FISC_YEAR = '2007'.
ACCOUNTGL-PSTNG_DATE = '20070725'.
ACCOUNTGL-DE_CRE_IND = 'S'.
append ACCOUNTGL.
ACCOUNTGL-ITEMNO_ACC = '0000000002'.
ACCOUNTGL-GL_ACCOUNT = '0000400002'. "99900
ACCOUNTGL-DOC_TYPE = 'KR'.
ACCOUNTGL-COMP_CODE = '7777'.
ACCOUNTGL-FISC_YEAR = '2007'.
ACCOUNTGL-PSTNG_DATE = '20070725'.
ACCOUNTGL-DE_CRE_IND = 'H'.
append ACCOUNTGL.
*Account payable
ACCOUNTPAYABLE-ITEMNO_ACC = '0000000001'.
ACCOUNTPAYABLE-GL_ACCOUNT = '0000000102'.
ACCOUNTPAYABLE-COMP_CODE = '7777'.
append ACCOUNTPAYABLE.
ACCOUNTPAYABLE-ITEMNO_ACC = '0000000002'.
ACCOUNTPAYABLE-GL_ACCOUNT = '0000400002'.
ACCOUNTPAYABLE-COMP_CODE = '7777'.
append ACCOUNTPAYABLE.
*Currency Amount
CURRENCYAMOUNT-ITEMNO_ACC = '0000000001'.
CURRENCYAMOUNT-CURRENCY_ISO = 'INR'.
MOVE 1000 TO CURRENCYAMOUNT-AMT_DOCCUR.
Append CURRENCYAMOUNT.
CURRENCYAMOUNT-ITEMNO_ACC = '0000000002'.
CURRENCYAMOUNT-CURRENCY_ISO = 'INR'.
MOVE '1000-' to CURRENCYAMOUNT-AMT_DOCCUR.
Append CURRENCYAMOUNT.
clear CURRENCYAMOUNT.
clear ACCOUNTGL.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = Docheader
CUSTOMERCPD =
CONTRACTHEADER =
IMPORTING
OBJ_TYPE = obj_typ
OBJ_KEY = obj_key
OBJ_SYS = obj_sys
tables
ACCOUNTGL = ACCOUNTGL
ACCOUNTRECEIVABLE =
ACCOUNTPAYABLE = ACCOUNTPAYABLE
ACCOUNTTAX =
currencyamount = CURRENCYAMOUNT
CRITERIA =
VALUEFIELD =
EXTENSION1 =
return = return.
if sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = ' '.
endif.
if sy-subrc = 0.
WRITE: / OBJ_KEY,
OBJ_TYP,
OBJ_SYS.
endif. -
Update qty in delivery note through bapi for migo
hi im using bapi for migo upload
my requiremnt is to update QTY IN DELIVERY NOTE in migo.
i got the folowing error if i dont pass the quantity.
qty and/0r delivery indicator or final issue indicator missing
if i pass the quantity field then it is changing quantity in unity of entity and qty in SKU i dnt want to change this field
here is my code,
gmcode-gm_code = '01'.
ls_GOODSMVT_HEADER-pstng_date = tdate . "sy-datum.
ls_GOODSMVT_HEADER-doc_date = sy-datum.
ls_GOODSMVT_HEADER-pr_uname = sy-uname.
loop at itab.
ls_GOODSMVT_HEADER-REF_DOC_NO = itab-LFSNR.
it_goodsmvt-move_type = itab-BWART.
it_goodsmvt-po_number = itab-EBELN.
it_goodsmvt-PO_ITEM = '10'.
it_goodsmvt-STGE_LOC = itab-LGORT.
it_goodsmvt-QUANTITY = itab-LSMNG.
it_goodsmvt-BASE_UOM = 'KG'.
it_goodsmvt-material = 'RC1092'.
it_goodsmvt-entry_qnt = itab-LSMNG.
it_goodsmvt-ENTRY_UOM = 'KG'.
it_goodsmvt-mvt_ind = 'B'.
it_goodsmvt-plant = 'G001'.
it_goodsmvt-NO_MORE_GR = 'X'.
append it_goodsmvt.
clear it_goodsmvt.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = ls_GOODSMVT_HEADER
goodsmvt_code = gmcode-gm_code
TESTRUN = ' '
GOODSMVT_REF_EWM =
IMPORTING
GOODSMVT_HEADRET =
MATERIALDOCUMENT = lf_MATERIALDOCUMENT
MATDOCUMENTYEAR = lf_MATERIALDOCYEAR
tables
goodsmvt_item = it_goodsmvt
GOODSMVT_SERIALNUMBER =
return = return
GOODSMVT_SERV_PART_DATA =
EXTENSIONIN =
if return-type ca 'EA'.
rollback work.
message id '26' type 'I' number '000'
with return-message.
else.
call function 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN =
wait up to 5 seconds.
endif.
select * fROM mseg
INTO CORRESPONDING FIELDS OF TABLE IT_MSEG
where mblnr = lf_MATERIALDOCUMENT and
MJAHR = lf_MATERIALDOCYEAR.
LOOP AT IT_MSEG INTO WA_MSEG.
IF WA_MSEG-LSMNG IS INITIAL.
wa_mseg-lsmng = ITab-LSMNG.
UPDATE MSEG from wa_mseg.
commit work.
wait up to 5 seconds.
ENDIF.
ENDLOOP.
ENDLOOP.It is been done by implementing one implicit enhancement in FM: MAP2I_B2017_GM_ITEM_TO_IMSEG
I have added the below functionality at the end of the function module.
Just i have maped the ERFMG i.e ent_qnt(Received quanity) with LSMNG i.e qty.in del note
All best for others.
$$-Start: (1)----
$$
ENHANCEMENT 1 Z_EV_IMP_GOODSMOVEMENT. "active version
Populate the delivery note quantity and UoM
IF IMSEG-ERFMG IS NOT INITIAL.
MOVE IMSEG-ERFMG TO IMSEG-LSMNG.
MOVE IMSEG-ERFME TO IMSEG-LSMEH.
ENDIF.
ENDENHANCEMENT.
Thanks,
Mahesh.Gattu
Edited by: Maheshkumar gattu on Dec 3, 2010 4:35 PM -
LSMW issue using BAPI for changing Purchase Order G/L Account
Wonder if anyone can help as I'm tearing my hair out!!
Have used LSMW lots of times using the transaction recorder, but tried using a BAPI as we have a mass update to do of G/L Accounts for Purchase Orders and it seems the tidiest and most efficient way to do it.
Got my LSMW project working as a test by changing the Short Text on a purchase order, this works fine. However, when I add the Account Assignment details in (Structure E1BPMEPOACCOUNT and E1BPMEACCOUNTX) everything seems to run fine, the IDOC posts and gives message 'Document xxx changed'. Yet when I look into the order it hasn't actually changed the G/L.
If I go into the purchase order in change mode in another session and run the LSMW again it recognises the purchase order is locked so it seems to be doing everything right, just not updating the G/L Account field. Anyone got any ideas ? It updated the short text fine so I'm sure everything is set up OK but for some reason it ignores the G/L that I upload. Anything relating to the Account Assignment (Unloading Point, GR, Cost Center) just gets ignored if I try and upload a change.
I seem to be so close it seems a shame not to be able to get it sorted !!!
Thanks,Helen Smith wrote:
HI Praveen,
>
> Thank you very much for your response. I tested the BAPI as per yor instructions and the return message comes back 'Eng & other PO xxxx changed' so it seems to indicate a success message again (like the LSMW does) but the actual data doesn't update.
>
> I thought I'd found it as I searched OSS and found note 0001382965 which seemed exactly my problem. I imported it and applied it but yet I still get the same issue - LSMW runs, says app doc posted and purchase order has been saved but no Account Assignment field will update.
>
> So it seems as if it's the BAPI not doing what it should - so I'm considering logging with SAPNET just to see if they can help as getting desperate with this one now! Felt sure I had it sorted when I found that note!
>
> Thanks
>
> Helen
>
> ** I should add I also ran the test above altering something in the item detail (the short text) - and that worked and updated. So it still seems to point to the Account Assignment part of the BAPI not updating.
>
> Edited by: Helen Smith on Nov 2, 2010 4:35 PM
Hi Helen,
Just wondering whether you have found solution to your issue.
We also encounter the same issue and have implemented the note without any positive result.
Please share if you found the solution.
Thank you.
Abraham -
Dear all,
I am facing one problem for upload the data from excel to FB01 T-code..
here my excel sheet is like this
Doc Date Posting date Doc type Posting key GL account Amount Posting key GL account Amount
03.04.2010 03.04.2010 40 60011 8391 50 & GL & TAX again repeate....
04.04.2010 04.04.2010 40 60011 5496 40 60012 2198 50 & GL & TAX
05.04.2010 05.04.2010 40 60011 7887 40 60012 0 50 & GL & TAX
How should i do the program.....
plz give me any bapi program or bdc program for this type excel sheet....
plz help me..
Regards
marganiPosting FI documents is one of the more frequently discussed topics here, please search before posting. Do not expect complete solutions for requirements, always work yourself first.
Thread locked.
Thomas -
Transfer Posting Issue through MB1B
Hi,
We have a requirement that During Transfer Posting of Material through MB1B transaction, User should be able to transfer the Stock within SAME Material Code (From Material A to Material A, but in diff. Plant)...
If User want to Transfer the Stock of A Material to B Material, system should not allow the same...
Please guide...SAP~MM wrote:
> But If, we want to Transfer the Stock to another Plant with same material code, then by which movement type we can do it..
>
> Please guide...
MVMT type : 301 Transfer posting plant to plant in one step
The quantity is transferred from unrestricted-use stock in the issuing plant to unrestricted-use stock in the receiving plant.
Possible special stock indicators: O, V, W
MVMT type : 303 Transfer posting plant to plant in two steps - removal from storage
The quantity is transferred from unrestricted-use stock of the issuing plant to stock in transfer in the receiving plant.
For technical reasons, you cannot carry out transfer postings from plant to plant in two steps for split-valuation materials.
Removal from storage can be posted via an SD delivery. -
Issue in BAPI for creating sales order
Dear friends,
BAPI_SALESORDER_CREATEFROMDAT2
and
BAPI_TRANSACTION_COMMIT
The above standard BAPI's we are using to create SO through third party software and the commit bapi to commit the order in DB, but the issue is now, we have created one new condition type for determining
1.Loading and Unloading point
2.Inco1 and Inco2
3.PayT.
This will trigger when we are selecting the ORDER Reason, this is working fine when we create the Order manually in SAP, but through Third party software this is not triggering, it is taking its own values from the master.Hello Experts,
I am having issue related to Item category determination.
Your inputs will be greatly appreciated.
We have a service order in which Item category is determining correctly. Let’s assume Material as “A” (Material type DIEN, Service,
Freight , etc..) and item category ZITC
is determined correctly.
Let’s assume sales order type as ZSOR
Now I would like to add another line item as miscellaneous
charges for the same order and we have a material created for that purpose Let’s
assume miscellaneous material as “B”
(Material type DIEN, Service,
Freight, etc..)
Both the materials “A” & “B” have Item category Group as “LEIS” (Service w/o Delivery), in material master Sales org 2 view.
In VOV4 we have config maintained as
Sa Ty | ItCGr | Usg | HLevItCa |DfItC
ZSOR | LEIS | | |ZITC
ZSOR | LEIS | TEXT| | ZITC
But when I add material “B” (miscellaneous charges)as a line item, I get the below error and item category is not determined.
No item category
available (Table T184 ZITC TEXT )
Message no. V1320
Thanks in advance -
Problem while Posting Assets through BAPI
Hi,
I am using BAPI_ACC_DOCUMENT_POST to handle assets postings in SAP.Here whenever i am running BAPI from SE37 using asset_no with regular length which is 6digits[730011] bapi is giving me correct results and documents gets posted successfully with assets.
The same thing when I do it from my program by populating values and filling the asset_no correctly in BAPI Structure I am getting error as below
"Asset 730011 not found in Company 1001".
but the same assets works fine through SE37.
Could anyone let me know why is this happening?
ThanksTry adding leading zeros.
( When you test via SE37 you come across conv_exit_module / kind of screen exit )
Hope this helps,
Erwan -
Post with Clearing: BAPI for clearing open items
Hi,
I'm looking for a way to use the logic of transaction F-30 (Post with Clearing) in an external application. I want to clear open items. Is there a BAPI or something else for it? While debugging transaction F-30 I found the function module POST_DOCUMENT together with function module FI_DOCUMENT_PROCESS which are used to actually clear the selected open items. But there is lot more coding around these function modules that might be needed/important. So, is there a BAPI that puts all together? Or what's the best way to do it at all?
Regards,
RobertHi,
BAPI_CR_ACC_GETOLDESTOPENITEM BAPI/BUS1010: Determine Oldest Open Item .... BAPI_AR_ACC_GETBALANCEDITEMS Customer account clearing transactions
thanks
abdul -
MCEKPO-MENGE issue through 2LIS_02_ITM for Statistical Purchase Order Items
Hello Everyone,
I have come across this strange scenario where a given Purchase Order Item in the Source system - SAP R/3 has been changed in the following sequence,
1. First the PO Item was marked as a Deleted PO - LOEKZ = L which set the STAPO = X (Statistical) and
2. The Deletion Indicator was removed for the PO Item which means LOEKZ now is not having "L" and the STAPO also has been removed.
Due to the above scenario, now the Order Quantity in the SAP BW system has 0 as the value whereas the Quantity in the SAP R/3 System shows up as 1.
I was curious to know if there are any OSS Notes or processes in place to avoid this from happening. As I searched the forum and service place for the OSS notes related to this issue and could not find anything related.
The Order Quantity in our system is extracted from 2LIS_02_ITM (MCEKPO-MENGE) field.
Thanks in advance for the help.
Dharma.hi Dharma..
Did you find a solution for this post?
I Have similar issue....
I Have an issue (I think is issue)...with extractor 2LIS_02_ITM about reversal or deleted indicator .
Some PO are created on R/3 and mark for deleted some line items I try or I hope received a R indicator . But I didn´t receive the indicator ..
I only receive X on this field.. (delete indicator). or in other examples blank on this field
Whats the difference between X , R and blank indicator?... when is posible receive X, R or blank value??
I was thinking that when on R/3 some lines of PO orders were deleted.. I receive "R" indicator when I extract to BW (on the PSA)... but I didn't...
If you know how work this kind of cases or examples, please explain me more.. or let me know where can I find more information please.
I will assign points to all the answer.
Thank you
Alice
Maybe you are looking for
-
I also have trouble with a meter showing how close I am to opening. I notice the circle a the top but it doesn't do me much good when trying to analyze how close I am to opening the file.
-
HT204161 Is there any way to change an alternate Apple ID?
A while ago now I bought my son an iMac and left it set up with my Apple ID so I paid for his iTunes stuff (Before Family Sharing). Without either of us realising the implications, that worked, but he also signed up for iCloud with his own ".me" ID,
-
Hello, I have recently migrated my application from Flex 3.2 to Flex 4.5. I am using few charts in my application. I have noticed a strange problem when I executed my application with Flex 4.5. The legend of my piechart is not visible. The text is v
-
Dear gurus how to map Downpayment process. Brfeore creating Sales orde 50% amount will be received & before PGI another 50% will be received, Reight we r using f-29 for downpayment is this only way or any other way is there? and i can't go for biili
-
JSP/Java vs ASP/VB Pay Difference
Hi all I have been looking at the pay for jsp/java vs asp/vb developers. I have found that for years it has been the same . For a person with say 3-4 years of either the salary tops tends to be comparable. Can anyone confirm this ? Does anyone know w