on 02-22-2005 5:50 AM
Hi friends
i got a requirement -> 'in f-02 the document type should be automatically taken after selecting the GL account no.'.
i have searched user exit for that but hav'nt got uptill . plese suggest me wheather any exit is available for that or i have to go for workflow for that .
thanks
regards
siddharth neekhra
tch cnlt
Hi Siddarth
i think, it's not possible to change the doc.type with a field exit after filling the account in the 1st posting-line, because posting-head is ready to this time and not changeable in SAP-Standard:
You 've to fill doc. type at first and then the first positng-line !
A possible solution might be to add a small report/dialog to fill account
and deduce doc.type and then work with "call transaction 'F-02' using bdcdata mode 'E' ".
Regards Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think you should rather try a FIELD EXIT. Run report RSMODPRF from SE38, select the respective data element and implement your logic.
When you run the report, take a look at its Documentation for further details.
Regards
Message was edited by: Shehryar Khan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi everybody,
I don't think a field exit could be useful, because with a field exit you can only access one field. For example, if you monitor field "G/L account", you could only change/validate information on "G/L account", not on "document type".
You could rather use Business Transaction Event 00001120.
For more help on BTE's, you could enter this link:
I hope it helps. BR,
Alvaro
Message was edited by: Alvaro Vidal-Abarca
Hi,
You said: <b>"I don't think a field exit could be useful"</b>, I humbly disagree, there are ways
<b>"because with a field exit you can only access one field"</b>, I totally agree but there are ways ;-).
All you have to do is to implement Field Exits for both GL Account and Document Type. In Field Exit for GL Account, simply EXPORT the value of entered GL Account to ABAP Memory. In the Field Exit for Document Type, import this value from ABAP Memory and implement logic to choose your document type. Set OUTPUT = CHOSEN_DOC_TYP.
Hope it helps.
Regards
THANKS i have tried this but its still not working .
i am getting error "document type not defined".
code is as follows
*****************************TO GET ACCOUNT NO.
FUNCTION FIELD_EXIT_NEWKO.
*"----
""Local interface:
*" IMPORTING
*" REFERENCE(INPUT)
*" EXPORTING
*" REFERENCE(OUTPUT)
*"----
export INPUT to memory id 'ZACCOUNT' .
OUTPUT = INPUT .
ENDFUNCTION .
*****************************TO GET DOCUMENT TYPE
FUNCTION FIELD_EXIT_BLART.
*"----
""Local interface:
*" IMPORTING
*" REFERENCE(INPUT)
*" EXPORTING
*" REFERENCE(OUTPUT)
*"----
DATA: BLART LIKE BKPF-BLART .
DATA: NEWKO LIKE RF05A-NEWKO .
TABLES: BKPF .
import NEWKO from memory id 'ZACCOUNT'.
SELECT SINGLE BLART FROM BKPF INTO BLART WHERE BELNR = NEWKO .
OUTPUT = BLART .
ENDFUNCTION.
Hi,
Try this in your first Field Exit:
DATA: NEWKO LIKE RF05A-NEWKO .
NEWKO = INPUT.
EXPORT NEWKO TO MEMORY ID 'ZACCOUNT'.
The name of variable exported and imported should be the same. Take a look at the documentation for EXPORT and IMPORT for further additions.
What is the value of SY-SUBRC after IMPORT as well as after SELECT statement? You can test the function by pressing F8 and then debugging it.
Regards
Message was edited by: Shehryar Khan
Message was edited by: Shehryar Khan
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.