‎2009 May 15 11:29 AM
Hi there. I've got such a strange problem ...
...
I've got a Z-program from which I have to CALL 'FBCJ' transaction and then pull out parameters from FBCJ into my z-program ...
DATA: _CJCAJONR TYPE cjnr .
DATA: _BUKRS TYPE bukrs .
CALL TRANSACTION 'FBCJ' .
GET PARAMETER ID 'BUK' FIELD _BUKRS . " ok (sy-subrc = 0)
GET PARAMETER ID 'CJCAJONR' FIELD _CJCAJONR . " sy-surbrc = 4
The problem is that _BUKRS is taken correctly, ... but CJCAJONR not
What could be the reason?
PS.
Both parameters are taken from the same FBCJ screen (Screen: 0050 Cash Journal Entry Screen for New Users), in technical information there is:
-> parameter: BUK, datatype: BUKRS
-> parameter: CJCAJONR, datatype: CJNR
‎2009 May 15 11:39 AM
Hi,
If parameter: CJCAJONR has datatype: CJNR
Then why are u writing this:
GET PARAMETER ID 'CJCAJONR' FIELD _CJCAJONR . " sy-surbrc = 4
instead of this
GET PARAMETER ID 'CJCAJONR' FIELD _CJNR .
Regards
Mudit
‎2009 May 15 11:41 AM
Hi Piotr,
Please first go to the transaction FBCJ .
Then fill the values of cjnr and bukrs .
Then once execute your program.
Regards
Pinaki
‎2009 May 15 11:43 AM
hi,
i have checked the tcode :FBCJ .i t too had a similar situation . it seems that global parameted id is getting cleard some where in the program in case of
CJCAJONR.
so you will not be able to fetch the values of this pram using get.
.To solve this you can create a pram id inside the tocde FBCJ and then pass that parm into the abab code.
safel
‎2009 May 15 12:04 PM
Safel007
I checked FBCJ code and there are few
SET PARAMETER ID 'BUK' FIELD f_comp_code.
but no
SET PARAMETER ID 'CJCAJONR' FIELD ... .
that's probably why we don't have that parameter in our Z-program ...
PS. I'm searching in first line solutions not modifying standard
Mudit Batra
Because I've got no _CJNR variable declared so how could I use it?
Pinaki Mukherjee
no result
‎2009 May 15 12:13 PM
Hi ,
If the 'CJCAJONR' does not exist for the current user in the SAP Memory,
the GET PARAMETER ID .... will not be successful.
That is why the SY-SUBRC becomes 4.
So once you pass some value in that parameter id after that the GET PARAMETER ID..
will be successful.
In the bellow code sy-subrc will be not be 4.
It will be 0.
DATA: _CJNR TYPE CJNR .
DATA: _BUKRS TYPE BUKRS.
CALL TRANSACTION 'FBCJ' .
_BUKRS = '1000'.
SET PARAMETER ID 'BUK' FIELD _BUKRS .
CLEAR _BUKRS.
_CJNR = '1'.
SET PARAMETER ID 'CJCAJONR' FIELD _CJNR .
CLEAR _CJNR.
GET PARAMETER ID 'BUK' FIELD _BUKRS . " ok (sy-subrc = 0)
GET PARAMETER ID 'CJCAJONR' FIELD _CJNR . " sy-surbrc = 0
‎2009 May 15 12:46 PM
Hi,
I checked the same scenario and I too getting same type of issue.
Better we need to check for guidance from SAP. or we need to check for any notes