on 11-01-2005 2:59 PM
I have this method that call a function. But when I execute the code the system show me a screen with the name of the class, interface, attributes and methods but I dont know where are going the information, because when I see the table, is empty. I want to fill the table with this fields.
Thanks for the help.
method ZCM_II_INTERFACE_BAL_INFO~EXECUTE_ASYNCHRONOUS.
data: DATE type ZBALANCEINT-ZDATE.
data: COMPANY_CODE type ZBALANCEINT-ZCODE.
data: GL_ACCOUNT type ZBALANCEINT-ZACCOUNT.
DATA: PROFIT_CENTER TYPE ZBALANCEINT-ZCENTER.
DATA: SUBSIDIARY_BALANCE TYPE ZBALANCEINT-ZBALANCE.
Convert Input Parameters
date = '01/12/05'.
company_code = '0101'.
gl_account = '014000202'.
profit_center = '0220'.
subsidiary_balance = '500.00'.
CALL FUNCTION 'ZCMBALANCE'
EXPORTING
DATE = DATE.
COMPANY_CODE = COMPANY_CODE.
GL_ACCOUNT = GL_ACCOUNT.
PROFIT_CENTER = PROFIT_CENTER.
subsidiary_balance = subsidiary_balance.
endmethod.
Into the function I have the code to insert or modify the table, this is my code:
FUNCTION zcmbalance.
*"----
""Local Interface:
*" IMPORTING
*" REFERENCE(DATE) TYPE ZFINTBCM017-GLDATE
*" REFERENCE(COMPANY_CODE) TYPE ZFINTBCM017-GLCCODE
*" REFERENCE(GL_ACCOUNT) TYPE ZFINTBCM017-GLACCOUNT
*" REFERENCE(PROFIT_CENTER) TYPE ZFINTBCM017-GLPRFCENTER
*" REFERENCE(SUBSIDIARY_BALANCE) TYPE ZFINTBCM017-SUBBALANCE
*"----
TABLES:
ZBALANCEINT.
SELECT SINGLE *
FROM ZBALANCEINT
WHERE ZDATE = DATE
AND ZCODE = COMPANY_CODE
AND ZACCOUNT = GL_ACCOUNT
AND ZCENTER = PROFIT_CENTER.
IF sy-subrc <> 0.
ZBALANCEINT-ZBALANCE = SUBSIDIARY_BALANCE.
INSERT ZBALANCEINT.
ELSE.
ZBALANCEINT-ZBALANCE = SUBSIDIARY_BALANCE.
MODIFY ZBALANCEINT.
ENDIF.
COMMIT WORK.
ENDFUNCTION.
[/code]
No, I execute the code from the method, in the SAP system.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use following code.
FUNCTION zcmbalance.
*"----
""Local Interface:
*" IMPORTING
*" REFERENCE(DATE) TYPE ZFINTBCM017-GLDATE
*" REFERENCE(COMPANY_CODE) TYPE ZFINTBCM017-GLCCODE
*" REFERENCE(GL_ACCOUNT) TYPE ZFINTBCM017-GLACCOUNT
*" REFERENCE(PROFIT_CENTER) TYPE ZFINTBCM017-GLPRFCENTER
*" REFERENCE(SUBSIDIARY_BALANCE) TYPE ZFINTBCM017-SUBBALANCE
*"----
TABLES:
ZBALANCEINT.
<b>DATA: ZBAL LIKE ZBALANCEINT.</b>
ZBAL-ZDATE = DATE
ZBAL-ZCODE = COMPANY_CODE
ZBAL-ZACCOUNT = GL_ACCOUNT
ZBAL-ZCENTER = PROFIT_CENTER.
SELECT SINGLE *
FROM ZBALANCEINT
WHERE ZDATE = DATE
AND ZCODE = COMPANY_CODE
AND ZACCOUNT = GL_ACCOUNT
AND ZCENTER = PROFIT_CENTER.
IF sy-subrc <> 0.
<b>ZBAL-ZBALANCE = SUBSIDIARY_BALANCE.</b>
<b>INSERT ZBALANCEINT FROM ZBAL.</b>
ELSE.
<b>ZBAL-ZBALANCE = SUBSIDIARY_BALANCE.</b>
<b>MODIFY ZBALANCEINT FROM ZBAL.</b>
ENDIF.
COMMIT WORK.
ENDFUNCTION.
Thanks to every body!!!
Shravan your code help me very much.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you trying to execute the proxy method? How are you executing the code? from XI?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.