SAP Reports / Programs | Sales and Distribution | Billing(SD-BIL) SAP SD

SDKURS01 SAP ABAP Report - Corr. prog. for SD docs due to inconsistency in for. curr. translation







SDKURS01 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). Below is the basic information available for this SAP report including which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC. Also check out the submitted Comments related to this SAP report or see any standard documentation available.

If you would like to execute this report or see the full code listing simply enter SDKURS01 into the relevant SAP transactions such as SE38 or SE80


ABAP code to call this SAP report using the submit statement

This report can be called from another progam/report simply by using the ABAP SUBMIT statement, see below for example ABAP code snipts of how to do this.






SUBMIT SDKURS01. "Basic submit
SUBMIT SDKURS01 AND RETURN. "Return to original report after report execution complete
SUBMIT SDKURS01 VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


Text pool values


Selection Text: VBELN = individual sales documents?
Selection Text: TEST = Test run?
Selection Text: TCURRVON = Date of first error CURR
Selection Text: TCURRBIS = Date of last error CURR
Selection Text: PROT = with log?
Selection Text: PRDT = Entry date, not pricing date?
Selection Text: FAKT = Billing documents?
Selection Text: AUFT = Sales documents?
Title: Corr. prog. for SD docs due to inconsistency in for. curr. translation
Text Symbol: 031 = Billing document saved
Text Symbol: 030 = Exch. rate KONV-KKURS new/old
Text Symbol: 029 = Error in update KONV
Text Symbol: 028 = Error in update VBRP
Text Symbol: 027 = Exch. rate VBRP-STCUR new/old
Text Symbol: 026 = Exch. rate VBRP-KURSK new/old
Text Symbol: 025 = Error in update VBRK
Text Symbol: 024 = Exch. rate VBRK-CMKUF new/old
Text Symbol: 023 = Exch. rate VBRK-KURRF new/old
Text Symbol: 022 = Error determining exchange rate
Text Symbol: 021 = Billing document read, document/domestic/statistical/credit currency:
Text Symbol: 012 = Order saved
Text Symbol: 011 = Error reading VBKD
Text Symbol: 010 = Error determining exchange rate
Text Symbol: 009 = Error in update VBAP
Text Symbol: 008 = Exch. rate VBAP-CMKUA new/old
Text Symbol: 007 = Exch. rate VBAP-STCUR new/old
Text Symbol: 006 = Error in update VBKD
Text Symbol: 005 = Exch. rate VBKD-STCUR new/old
Text Symbol: 004 = Exch. rate VBKD-KURRF new/old
Text Symbol: 003 = Exch. rate VBKD-KURSK new/old
Text Symbol: 002 = Order saved (net value new/old)
Text Symbol: 001 = Order read, document/domestic/statistical/credit currency:


INCLUDES used within this REPORT SDKURS01

INCLUDE KONVDATA.
INCLUDE THEADDAT.
INCLUDE VBRKDATA.
INCLUDE VBRPDATA.
INCLUDE VBPADATA.
INCLUDE VBFSDATA.





TABLES used within REPORT and the associated SELECT statement:

No SAP DATABASE tables are accessed within this REPORT code!


Function Modules used within report and the associated call statement:

READ_EXCHANGE_RATE CALL FUNCTION 'READ_EXCHANGE_RATE' EXPORTING DATE = SAV_DATUM FOREIGN_CURRENCY = VBAK-WAERK LOCAL_CURRENCY = US_HWAER TYPE_OF_RATE = VBAK-KURST IMPORTING EXCHANGE_RATE = VBKD-KURSK EXCEPTIONS ERROR_MESSAGE = 1.

READ_EXCHANGE_RATE CALL FUNCTION 'READ_EXCHANGE_RATE' EXPORTING DATE = SAV_DATUM FOREIGN_CURRENCY = VBAK-STWAE LOCAL_CURRENCY = US_HWAER IMPORTING EXCHANGE_RATE = VBKD-STCUR EXCEPTIONS ERROR_MESSAGE = 1.

READ_EXCHANGE_RATE CALL FUNCTION 'READ_EXCHANGE_RATE' EXPORTING DATE = VBAP-ERDAT FOREIGN_CURRENCY = VBAK-STWAE LOCAL_CURRENCY = US_HWAER IMPORTING EXCHANGE_RATE = VBAP-STCUR EXCEPTIONS ERROR_MESSAGE = 1.

READ_EXCHANGE_RATE CALL FUNCTION 'READ_EXCHANGE_RATE' EXPORTING DATE = VBAP-ERDAT FOREIGN_CURRENCY = VBAK-CMWAE LOCAL_CURRENCY = US_HWAER IMPORTING EXCHANGE_RATE = VBAP-CMKUA EXCEPTIONS ERROR_MESSAGE = 1.

SD_SALES_DOCUMENT_READ CALL FUNCTION 'SD_SALES_DOCUMENT_READ' EXPORTING DOCUMENT_NUMBER = US_VBAK-VBELN EXCEPTIONS ERROR_MESSAGE = 01.

MESSAGE_TEXT_BUILD CALL FUNCTION 'MESSAGE_TEXT_BUILD' EXPORTING MSGID = SY-MSGID MSGNR = SY-MSGNO MSGV1 = SY-MSGV1 MSGV2 = SY-MSGV2 IMPORTING MESSAGE_TEXT_OUTPUT = TEXT.

SD_SALES_DOCUMENT_PERFORM CALL FUNCTION 'SD_SALES_DOCUMENT_PERFORM' EXPORTING IN_PROGRAM = 'SAPFV45K' PERFORM = 'KREDIT_WEITERLEITEN' EXCEPTIONS ERROR_MESSAGE = 01.

MESSAGE_TEXT_BUILD CALL FUNCTION 'MESSAGE_TEXT_BUILD' EXPORTING MSGID = SY-MSGID MSGNR = SY-MSGNO MSGV1 = SY-MSGV1 MSGV2 = SY-MSGV2 IMPORTING MESSAGE_TEXT_OUTPUT = TEXT.

SD_SALES_DOCUMENT_SAVE CALL FUNCTION 'SD_SALES_DOCUMENT_SAVE' EXPORTING SYNCHRON = TRUE IMPORTING EVBAK = *VBAK EXCEPTIONS ERROR_MESSAGE = 01.

MESSAGE_TEXT_BUILD CALL FUNCTION 'MESSAGE_TEXT_BUILD' EXPORTING MSGID = SY-MSGID MSGNR = SY-MSGNO MSGV1 = SY-MSGV1 MSGV2 = SY-MSGV2 IMPORTING MESSAGE_TEXT_OUTPUT = TEXT.

READ_EXCHANGE_RATE CALL FUNCTION 'READ_EXCHANGE_RATE' EXPORTING DATE = I_VBRK-FKDAT FOREIGN_CURRENCY = I_VBRK-WAERK LOCAL_CURRENCY = HHWAER IMPORTING EXCHANGE_RATE = I_VBRK-KURRF EXCEPTIONS NO_RATE_FOUND = 1 NO_FACTORS_FOUND = 2 OTHERS = 3.

READ_EXCHANGE_RATE CALL FUNCTION 'READ_EXCHANGE_RATE' EXPORTING DATE = I_VBRK-FKDAT FOREIGN_CURRENCY = I_VBRK-CMWAE LOCAL_CURRENCY = HHWAER IMPORTING EXCHANGE_RATE = I_VBRK-CMKUF EXCEPTIONS NO_RATE_FOUND = 1 NO_FACTORS_FOUND = 2 OTHERS = 3.

READ_EXCHANGE_RATE CALL FUNCTION 'READ_EXCHANGE_RATE' EXPORTING DATE = VBRP-PRSDT FOREIGN_CURRENCY = I_VBRK-WAERK LOCAL_CURRENCY = HHWAER TYPE_OF_RATE = I_VBRK-KURST IMPORTING EXCHANGE_RATE = VBRP-KURSK EXCEPTIONS NO_RATE_FOUND = 1 NO_FACTORS_FOUND = 2 OTHERS = 3.

READ_EXCHANGE_RATE CALL FUNCTION 'READ_EXCHANGE_RATE' EXPORTING DATE = I_VBRK-FKDAT FOREIGN_CURRENCY = I_VBRK-STWAE LOCAL_CURRENCY = HHWAER IMPORTING EXCHANGE_RATE = VBRP-STCUR EXCEPTIONS NO_RATE_FOUND = 1 NO_FACTORS_FOUND = 2 OTHERS = 3.

RV_INVOICE_DOCUMENT_READ CALL FUNCTION 'RV_INVOICE_DOCUMENT_READ' EXPORTING VBRK_I = I_VBRK ACTIVITY = '02' IMPORTING VBRK_E = D_VBRK VBUK_E = D_VBUK TABLES XKOMV = XKOMV XVBPA = XVBPA XVBRK = XVBRK XVBRP = XVBRP EXCEPTIONS OTHERS = 1.

MESSAGE_TEXT_BUILD CALL FUNCTION 'MESSAGE_TEXT_BUILD' EXPORTING MSGID = SY-MSGID MSGNR = SY-MSGNO MSGV1 = SY-MSGV1 MSGV2 = SY-MSGV2 IMPORTING MESSAGE_TEXT_OUTPUT = TEXT.

RV_INVOICE_DOCUMENT_ADD CALL FUNCTION 'RV_INVOICE_DOCUMENT_ADD' EXPORTING VBSK_I = VBSK IMPORTING VBSK_E = VBSK TABLES XKOMFK = XKOMFK XKOMV = XKOMV XTHEAD = XTHEAD XVBFS = XVBFS XVBPA = XVBPA XVBRK = XVBRK XVBRP = XVBRP XVBSS = XVBSS EXCEPTIONS OTHERS = 1.

MESSAGE_TEXT_BUILD CALL FUNCTION 'MESSAGE_TEXT_BUILD' EXPORTING MSGID = SY-MSGID MSGNR = SY-MSGNO MSGV1 = SY-MSGV1 MSGV2 = SY-MSGV2 IMPORTING MESSAGE_TEXT_OUTPUT = TEXT.



Contribute (Add Comments)

Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.







The contribute/comments section below therefore offer's an opportunity for anyone to add additional information. This can be anything from useful hints, tips and screen shots to relevant SAP notes or anything else you feel is relevant to this report.

This will then be available for everyone to easily find by simply searching on the report name SDKURS01 or its description.