Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member197610
Active Contributor
7,353

Hi All,

I was recently working in  Invoice data extraction from ECC to BW.I was implementing the standard BC objects of 2LIS_06_INV however there is no mappings available between the Datasource and the Infosource from the standard contents. I tried in lot of SDN threads and many SAP help portals but i couldn't find the mappings between them and i saw some threads this BC is incomplete.Finally i found the answer and i thought it would be helpful for our folks who is searching for these mapping details now or in near future.

These mappings to the Infosource is based on the DSO - 0LIV_DS01; but still we can use this mappings and the data flow to get the Invoice details for the SRM standard DSO 0SRIV_D3 ( This is method will be applicable to the Extended Classic Scenario in SRM )

ContentSourceDataSource  2LIS_06_INV
SAPTargetInfoSource  2LIS_06_INV

Source Field NameDescriptionData TypeLengthRule TypeTarget InfoObjectDescriptionInfoObjTypLength
KOARTAccount TypeCHAR1[DIRECT]0ACCT_TYPEAccount typeCHAR1
VORNROper./Act.CHAR4[DIRECT]0ACTIVITYNetwork ActivityCHAR4
LSTARActivity TypeCHAR6[DIRECT]0ACTTYPEActivity TypeCHAR6
ANLN2SubnumberCHAR4[DIRECT]0ASSETAsset Sub-numberCHAR4
ANLN1AssetCHAR12[DIRECT]0ASSET_MAINMain Asset NumberCHAR12
BASMEBase unitUNIT3[DIRECT]0BASE_UOMBase Unit of MeasureUNIT3
KNTTPAcct Assgt Cat.CHAR1[DIRECT]0BBP_ACCCATAccount Assignment CategoryCHAR5
COBL_NRSeq. no.NUMC4[DIRECT]0BBP_ACC_NOSequential Number of Account AssignmentNUMC4
LFPOSRef. Doc. ItemNUMC4[DIRECT]0BBP_COITEMItem Number in Confirmation DocumentNUMC10
LFBNRReference Doc.CHAR10[DIRECT]0BBP_CON_IDConfirmation NumberCHAR10
KONNRAgreementCHAR10[DIRECT]0BBP_CTC_IDContract IDCHAR10
KTPNRAgreement ItemNUMC5[DIRECT]0BBP_CTITEMItem Number in ContractNUMC10
XBLNRReferenceCHAR16[DIRECT]0BBP_DELREFVendor Document NumberCHAR16
BKTXTDoc.Header TextCHAR25[DIRECT]0BBP_DESCRName of DocumentCHAR40
EREKZFinal InvoiceCHAR1[DIRECT]0BBP_FININ2Final Invoice Indicator 2CHAR1
MWSKZ_BNKTax CodeCHAR2[DIRECT]0BBP_FRTCODFreight Tax IndicatorCHAR2
BUZEIItemNUMC6[DIRECT]0BBP_INITEMItem Number in InvoiceNUMC10
IVTYPIV categoryCHAR1[DIRECT]0BBP_INPTYPCreation IndicatorCHAR1
BELNRDocument NumberCHAR10[DIRECT]0BBP_INV_IDInvoice NumberCHAR10
EBELPItemNUMC5[DIRECT]0BBP_POITEMItem Number in Order DocumentNUMC10
EBELNPurchasing Doc.CHAR10[DIRECT]0BBP_PO_IDNumber of Purchase OrderCHAR10
XRECHInvoiceCHAR1[DIRECT]0BBP_SUBTYPDocument CharacteristicsCHAR2
SPGRSBlkg Reas. AmountCHAR1[DIRECT]0BLCKRSN_AMBlocking Reason: AmountCHAR1
SPGRTBl. Reason DateCHAR1[DIRECT]0BLCKRSN_DTBlocking Reason: DateCHAR1
ZLSPRPmnt BlockCHAR1[DIRECT]0BLCKRSN_HMBlocking Reason: Manual (Header)CHAR1
MRM_ZLSPRLog. payt blockCHAR1[DIRECT]0BLCKRSN_HSBlocking Reason: Statistical (Header)CHAR1
SPGRQMan.Block.ReasnCHAR1[DIRECT]0BLCKRSN_MNBlocking Reason: Manual (Item)CHAR1
SPGRVBlock.reas:projCHAR1[DIRECT]0BLCKRSN_PJBlocking Reason: Project BudgetCHAR1
SPGRGBlock.reas: OPQCHAR1[DIRECT]0BLCKRSN_PQBlocking Reason: Purchase Order Price QuantityCHAR1
SPGRPBlock.reas.Pr.CHAR1[DIRECT]0BLCKRSN_PRBlocking Reason: PriceCHAR1
SPGRCBlock: qualityCHAR1[DIRECT]0BLCKRSN_QLBlocking Reason: QualityCHAR1
SPGRMBlock.reas.:qtyCHAR1[DIRECT]0BLCKRSN_QNBlocking Reason: QuantityCHAR1
GSBERBusiness AreaCHAR4[DIRECT]0BUS_AREABusiness areaCHAR4
BLDATDocument DateDATS8[TIME]0CALDAYCalendar DayDATS8
KTOPLChart of AcctsCHAR4[DIRECT]0CHRT_ACCTSChart of accountsCHAR4
FIPOSCommitment ItemCHAR14[DIRECT]0CMMT_ITEMCommitment itemCHAR24
BUKRSCompany CodeCHAR4[DIRECT]0COMP_CODECompany codeCHAR4
AUFNROrderCHAR12[DIRECT]0COORDEROrder NumberCHAR12
KOSTLCost CenterCHAR10[DIRECT]0COSTCENTERCost CenterCHAR10
KOKRSCO AreaCHAR4[DIRECT]0CO_AREAControlling areaCHAR4
UMRENDenominatorDEC5[DIRECT]0DENOMIN_SUDenominator for Converting BaseUoM into Sales UnitINT44
BPUMNQty ConversionDEC5[DIRECT]0DENOMI_UCDenominator for Conversion of OUn into OPUnDEC9
GJAHRFiscal YearNUMC4[TIME]0FISCYEARFiscal yearNUMC4
FIKRSFM AreaCHAR4[DIRECT]0FM_AREAFinancial Management AreaCHAR4
FKBERFunctional AreaCHAR16[DIRECT]0FUNC_AREAFunctional areaCHAR16
GEBERFundCHAR10[DIRECT]0FUNDFundCHAR20
FISTLFunds CenterCHAR16[DIRECT]0FUNDS_CTRFunds CenterCHAR16
SAKNRG/L AccountCHAR10[DIRECT]0GL_ACCOUNTG/L AccountCHAR10
WEPOSGoods ReceiptCHAR1[DIRECT]0GR_INDICGoods Receipt IndicatorCHAR1
WEUNBGR Non-ValuatedCHAR1[DIRECT]0GR_NONVALGoods Receipt, Non-ValuatedCHAR1
WAERSCurrencyCUKY5[DIRECT]0INV_CURRCurrency of InvoiceCUKY5
LIFNRInvoicing PtyCHAR10[DIRECT]0INV_PTYDifferent invoicing partyCHAR10
RBSTATInv. statusCHAR1[DIRECT]0INV_STATInvoice StatusCHAR1
PSTYPItem CategoryCHAR1[DIRECT]0ITM_CATItem Category in Purchasing DocumentCHAR1
ARKUENInv. reductionCURR13[DIRECT]0LIV_AUIVRAutomatic Invoice Reduction Amount (Net)CURR9
ARKUEMWTax inv. red.CURR13[DIRECT]0LIV_AUIVRTTax for Automatic Invoice Reduction AmountCURR9
AREWRGR/IR clr.valueCURR13[DIRECT]0LIV_GRIRLCClearing Value GR/IR Account in Local CurrencyCURR9
BPWEMGR Qty in OPUnQUAN13[DIRECT]0LIV_GRQEPUGoods Receipt Quantity in Purchase Order Price UnitQUAN9
WEMNGReceivedQUAN13[DIRECT]0LIV_GRQHOUGoods Receipt Quantity in Purchase Order UnitQUAN9
WEWWRGR val.(FCurr.)CURR13[DIRECT]0LIV_GRVHICGoods Receipt Value in Invoice CurrencyCURR9
DIFFNIV DifferenceCURR13[DIRECT]0LIV_IVDFFTotal-Based Accepted Invoice Difference (Net)CURR9
DIFFMWTax differenceCURR13[DIRECT]0LIV_IVDFFTTax for Total-Based Accepted Invoice DifferenceCURR9
RMWWRGross inv. amntCURR13[DIRECT]0LIV_IVGAICGross Invoice Amount in Invoice CurrencyCURR9
MENGEQuantityQUAN13[DIRECT]0LIV_IVQEOUInvoice Quantity in Purchase Order UnitQUAN9
BPMNGQty in OPUnQUAN13[DIRECT]0LIV_IVQEPUInvoice Quantity in Purchase Order Price UnitQUAN9
REMNGInvoice qtyQUAN13[DIRECT]0LIV_IVQHOUInvoice Quantity History in Purchase Order UnitQUAN9
BPREMIR quantityQUAN13[DIRECT]0LIV_IVQHPUInvoice Quantity History in Purchase Order Price UnitQUAN9
RBMNGInv. doc. qtyQUAN13[DIRECT]0LIV_IVQVOUInvoice Quantity According to Vendor in Purchase Order UnitQUAN9
BPRBMInvQty POunitQUAN13[DIRECT]0LIV_IVQVPUInvoice Quantity Acc. to Vendor in Purchase Order Price UnitQUAN9
REFWRInv.value in FCCURR13[DIRECT]0LIV_IVVEFCInvoice Value Entered in Foreign CurrencyCURR9
REWWRFC invoice amntCURR13[DIRECT]0LIV_IVVHICInvoice Value History in Invoice CurrencyCURR9
RBWWRInv.amnt FCCURR13[DIRECT]0LIV_IVVVICInvoice Value According to Vendor in Invoice CurrencyCURR9
MAKZNManAccpdNetAmntCURR13[DIRECT]0LIV_MNIVDManually Accepted Difference Amount (Net)CURR9
MAKZMWTax accptd man.CURR13[DIRECT]0LIV_MNIVDTTax for Manually Accepted Difference AmountCURR9
BSMNGPO QuantityQUAN13[DIRECT]0LIV_ORQTOUPurchase Order Quantity in Order UnitQUAN9
NETWRNet ValueCURR15[DIRECT]0LIV_ORVTICPurchase Order Value in Invoice CurrencyCURR9
WENWRNet value in FCCURR13[DIRECT]0LIV_SRVNFCAccepted Service Value Net in Foreign CurrencyCURR9
LIEFFNVend.error(net)CURR13[DIRECT]0LIV_VDERRVendor Error (Net)CURR9
LIEFFMWTax, vend.errorCURR13[DIRECT]0LIV_VDERRTTax for Vendor ErrorCURR9
HWAERCurrencyCUKY5[DIRECT]0LOC_CURRCYLocal currencyCUKY5
LOGSYSLogical systemCHAR10[DIRECT]0LOGSYS_PURLogical Procurement SystemCHAR10
MATNRMaterialCHAR18[DIRECT]0MATERIALMaterialCHAR18
MATKLMaterial GroupCHAR9[DIRECT]0MATL_GROUPMaterial groupCHAR9
NETPRNet PriceCURR11[DIRECT]0NETPRICENet priceCURR9
NPLNRNetworkCHAR12[DIRECT]0NETWORKNetworkCHAR12
NOQUANTITYNo quantityCHAR1[DIRECT]0NOQUANTITYDocument Item Without QuantityCHAR1
UMREZCounterDEC5[DIRECT]0NUMERAT_SUNumerator for Converting Base UoM into Sales UnitINT44
BPUMZQty ConversionDEC5[DIRECT]0NUMERA_UCCounter for Conversion of OUn into OPUnDEC9
BEWAEOrder currencyCUKY5[DIRECT]0ORDER_CURRPurchase Order CurrencyCUKY5
WERKSPlantCHAR4[DIRECT]0PLANTPlantCHAR4
BPRMEPO Price UnitUNIT3[DIRECT]0PO_PR_UNITOrder price unit (purchasing)UNIT3
MEINSBase UnitUNIT3[DIRECT]0PO_UNITOrder unitUNIT3
PEINHPrice UnitDEC5[DIRECT]0PRICE_UNITPrice unitDEC9
TXZ01Short TextCHAR40[DIRECT]0PROD_DESCRProduct DescriptionCHAR40
PRCTRProfit CenterCHAR10[DIRECT]0PROFIT_CTRProfit CenterCHAR10
PAOBJNRProfit. segmentNUMC10[DIRECT]0PROFTB_SEGNumber for Profitability Segments (CO-PA)NUMC10
BUDATPosting DateDATS8[DIRECT]0PSTNG_DATEPosting date in the documentDATS8
EKORGPurchasing Org.CHAR4[DIRECT]0PURCH_ORGPurchasing organizationCHAR4
EKGRPPurch. GroupCHAR3[DIRECT]0PUR_GROUPPurchasing GroupCHAR3
ROCANCELRec. Type Extract.CHAR1[DIRECT]0RECORDMODEBW Delta Process: Update ModeCHAR1
LFGJAYear cur.periodNUMC4[DIRECT]0REF_DOC_FYFiscal Year of Reference DocumentNUMC4
AFNAMRequisitionerCHAR12[ROUTINE]0REQUESTERRequesterCHAR10

Routine Code for Rule

... "insert your code here                                                                                                                                                         

Data : lv_RECORD_NO LIKE SY-TABIX,                                                                                                                                                              

ls_minfo TYPE rssm_s_minfo,                                                                                                                                                               

ls_monitor TYPE rsmonitor,                                                                                                                                                  

lt_ERRORLOG TYPE rssm_t_errorlog_int,                                                                                                                                                           

lv_RESULT type /BI0/OIREQUESTER,                                                                                                                                                 

ls_errorlog TYPE rssm_s_errorlog_int,                                                                                                                                                  

l_rc type i.                                                                                                                                                              

DATA: l_s_errorlog TYPE rssm_s_errorlog_int,                                                                                                                                                    

l_text TYPE string.                                                                                                                                                

perform bbp_get_requester using SOURCE_FIELDS-AFNAM                                                                                                                                                 

lv_RECORD_NO                                                                                                                                                    

ls_minfo                                                                                                                                                 

changing lv_RESULT                                                                                                                                                             

lt_errorlog                                                                                                                                                              

l_rc.                                                                                                                                                        

IF l_rc <> 0.                                                                                                                                                            

loop at lt_errorlog into ls_errorlog.                                                                                                                                                        

MOVE-CORRESPONDING ls_errorlog TO ls_monitor.                                                                                                                                                          

APPEND ls_monitor TO MONITOR.                                                                                                                                                    

End Loop.                                                                                                                                                               

RAISE EXCEPTION TYPE cx_rsrout_skip_val.                                                                                                                                                    

ELSE.                                                                                                                                                     

RESULT = lv_result.                                                                                                                                                               

ENDIF.                                                                                                                                                   

                                                                                                         

RETPOReturns ItemCHAR1[DIRECT]0RET_ITMReturns ItemCHAR1
STJAHYearNUMC4[DIRECT]0REV_DOC_FYFiscal Year of Reversal DocumentNUMC4
STBLGReversed byCHAR10[DIRECT]0REV_DOC_NOReversal Document NumberCHAR10
BEZNKUnpl. del. cstsCURR13[DIRECT]0SR_FREIGICFreight Costs in Invoice in Invoice CurrencyCURR9
WRBTRAmountCURR13[DIRECT]0SR_IVVICNet Invoiced Value in Invoice CurrencyCURR9
TBTKZSub. deb./cred.CHAR1[DIRECT]0SR_SCREDSubsequent credit / debitCHAR1
WMWST1Value-Added TaxCURR13[DIRECT]0SR_TAXESICTax Amount of Invoice in Invoice CurrencyCURR9
LIFNR2VendorCHAR10[DIRECT]0VENDORVendorCHAR10
PS_PSP_PNRWBS ElementNUMC8[DIRECT]0WBS_ELEMTWork Breakdown Structure Element (WBS Element)CHAR24
BUKRSCompany CodeCHAR4[ROUTINE]0FISCVARNTFiscal year variantCHAR2

Routine Code for Rule


* Update the fiscal year variant based on the company code                                                                                                                 

* delivered in the source data of 2LIS_06_INV                                                                                                                       

DATA: ls_comp_code TYPE /rtf/_s_comp_code,                                                                                                                   

lc_error TYPE REF TO /rtf/cx_root.                                                                                                               

* Determine the details of the company code                                                                                                                

CALL METHOD /rtf/cl_comp_code=>single_read                                                                                                                 

EXPORTING                                                                                                             

i_comp_code = SOURCE_FIELDS-bukrs                                                                                                                  

IMPORTING                                                                                                             

es_comp_code = ls_comp_code.                                                                                                                    

CATCH /rtf/cx_comp_code INTO lc_error.                                                                                                                

CALL METHOD lc_error->conv_2_msgline                                                                                                               

CHANGING                                                                                                              

xs_msg = monitor_rec.                                                                                                            

RAISE EXCEPTION TYPE CX_RSROUT_ABORT.                                                                                                                       

* Update the Fiscalyear Variant                                                                                                                       

RESULT = ls_comp_code-fiscvarnt.                                                                                                               

[NO_UPDATE]0GN_R3_SSYSource System for R/3 EntityCHAR2
[NO_UPDATE]0BBP_SYS_BELogical Backend SystemCHAR2
[NO_UPDATE]0RT_PRDIFFPrice Difference (Local Currency)CURR9

Hope this Helps ......

1 Comment
Labels in this area