Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Call a standard transaction and return .

Former Member
0 Kudos

Hi there.

I've got such task that I need to call z FBCJ transacion from my Z-transaction and then when FBCJ transaction ends I need to come back to my Z-transaction.

When I try to do

 CALL TRANSACTION 'FBCJ' . 

then FBCJ is called. Great.

Now when I push 'BACK' or 'LEAVE' or 'EXIT' it brings me back to Z-transaction. Super - that's what I need!

But am I able to handle the X-click closing the window in FBCJ? (I mean 'X' in top right corner of the window).

Because I need to add some action in my Z-tcode when FBCJ ends ... so I need to detect the end action.

I'd be thankful for help. Greetings.

6 REPLIES 6

former_member194669
Active Contributor
0 Kudos

Instead of calling with call transaction why don't you try with bapi BAPI_CASHJOURNALDOC_CREATE

I think we cannot control the (X button ) in the FBCJ, Its system function

0 Kudos

And another question for CALL TRANSACTION ...

... when I do

CALL TRANSACTION 'FBCJ' . 

1) .... the user works with specific parameters in FBCJ - WERKS (Shop number) and BUKRS (Company code).

2) Now user leaves FBCJ transaction (bu pressing BACK, LEAVE or EXIT) button ...

3) ... FBCJ ends and back to Z-program

Question: am I able to check in Z-progam which parameters (WERKS and BUKRS) user was working with?

Task

Maybe I will explain what I'm going to achieve ... when user ends working with FBCJ transaction I need to check if he has got some saved (put not posted) items. If such items exist (then they are with yellow semafor) - I need to post all those items which have got only save status .

Problem

FBCJ has got no USER-EXITS, we've got no CJ_DOCUMENT BADI in our 4.6c neither. So I'm trying to cook something up ...

Proposal

So I could create ZFBCJ transaction which would CALL TRANSACTION 'FBCJ' ... now when user ends the real FBCJ activities and leave FBCJ - I will catch that moment in ZFBCJ transaction and post all items which are saved but not posted.

0 Kudos

Hi,

Instead of a Z transaction you could create a daily (or an every 30 minutes) batch program that will select and post all preceedingly saved items.

For your second question, yes can know which WERKS and BUKRS user has enterred with the GET PARAMETER ID statement (WRK for WERKS and BUK for BUKRS).

Issa

0 Kudos

Try this and you can check msgtab table for the values used during transaction.

DATA: ITAB LIKE BDCDATA OCCURS 1 WITH HEADER LINE.
* Message Tab.
DATA: MSGTAB LIKE BDCMSGCOLL OCCURS 10 WITH HEADER LINE.
CALL TRANSACTION 'FBCJ' USING ITAB UPDATE 'S' MESSAGES INTO MSGTAB.

0 Kudos

Issa SY

GET PARAMETER ... it would be great. But I've got a small problem ... I CALL FBCJ then do some action (change bukrs and werks) then BACK


  DATA: _WERKS TYPE werks .

  CALL TRANSACTION 'FBCJ' .
  GET PARAMETER ID 'WRK' FIELD _WERKS . 

GET parameter returns me sy-subrc = 4

What am I doing wrong

0 Kudos

This means there is no PARAMETER ID SET in FBCJ transaction, so this cannot work.

Issa