on 2024 Jul 25 2:28 PM
Hi, I have a custom program that has 2 IF ELSE conditions.
IF IDOC DOCUMENT IS POSTED.
ASSIGN ('(SAPLFACI)BKPF') TO FIELD-SYMBOL(<FS_BKPF>). <---This is the existing code and it works just fine.
ELSEIF IDOC DOCUMENT IS PARKED.
ASSIGN ('(SAPLFACI)BKPF') TO <FS_BKPF>. <---Tried to add this but it does not work. I'm not sure why. Is it because the IDOC is parked? But they both have accounting documents.
ENDIF.
Request clarification before answering.
I've done this several times by just calling one of the function modules of the appropriate function group.
However, this has some possible drawbacks: This procedure requires a function module that can be called without any further impact on the current Idoc, so basically a dummy function module would be fine, e.g. one that gives back a value and does not modify any data.
Maybe the FM FI_ACC_GET would be worth looking at to do a dummy call and the function group is properly initialized afterwards.
But still the question is, if you assign an external variable, you cannot expect that is has some meaningful value in the field symbol.
Because if you have to apply such tricks as above, the global variables in include SAPLFACI won't have any values either, just initial ones.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
17 | |
8 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.