Application Development and Automation 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: 
Read only

Challenging ABAP issue

Former Member
0 Likes
833

Hi,

CJFN is the program which runs on company codes. But my requirement is to execute this program on the range of company codes. So what I did, i have created a ZCJFN and take the company codes from user, put in internal table, loop internal table ,and inside the loop i m calling CJFN program like


  SUBMIT rffms300 USING  SELECTION-SCREEN '1000'
                  WITH p_bukrs EQ  gwa_coep-bukrs
                  WITH p_gjahr EQ v_gjahr
                  WITH p_belnrb EQ '1'
                  WITH p_belnre EQ '9999999999'
                  WITH p_test EQ ' '
                  WITH p_liste EQ ' '
                  WITH p_lopen EQ ' '
                  AND RETURN.

Now the problem is, if there are some problem in transfers(as this program do transfers), then this program does NOT have capability to show the company codes and the document numbers which processed sucessfully.

Requirement:

At the end of program, a list should be created which will display the company code alongwith the document number, which have been process sucessfully.

1- Is there any table from where we can check this thing.

Otherwise, what is the possible way....

It's very urgent,,,,please give solution....

Thanks,

Hi,

CJFN is the program which runs on company codes. But my requirement is to execute this program on the range of company codes. So what I did, i have created a ZCJFN and take the company codes from user, put in internal table, loop internal table ,and inside the loop i m calling CJFN program like


  SUBMIT rffms300 USING  SELECTION-SCREEN '1000'
                  WITH p_bukrs EQ  gwa_coep-bukrs
                  WITH p_gjahr EQ v_gjahr
                  WITH p_belnrb EQ '1'
                  WITH p_belnre EQ '9999999999'
                  WITH p_test EQ ' '
                  WITH p_liste EQ ' '
                  WITH p_lopen EQ ' '
                  AND RETURN.

Now the problem is, if there are some problem in transfers(as this program do transfers), then this program does NOT have capability to show the company codes and the document numbers which processed sucessfully.

Requirement:

At the end of program, a list should be created which will display the company code alongwith the document number, which have been process sucessfully.

1- Is there any table from where we can check this thing.

Otherwise, what is the possible way....

It's very urgent,,,,please give solution....

Thanks,

5 REPLIES 5
Read only

former_member199581
Active Participant
0 Likes
763

I think you should submit document-by-document.

Doing this, you have the capability to check if the document has been processed correctly or not.

If you submit between 1 and 99999999, then the program works in massive mode and keeps the results..if an error occurs, you lose everything.

Hope this helps,

Roby.

Read only

0 Likes
763

First of all tell me what is the benifit in running it on document number basis.

The second thing is for massive mode...user is not interested to run this program in dialog work process, infact user is creating background job for this. So that is no problem.

Pls suggest.

Read only

0 Likes
763

Ok, that's no problem.

So, help me understand well:

What do you mean exactly with

<i>"then this program does NOT have capability to show the company codes and the document numbers which processed sucessfully."</i>

What is the behaviour of the program if an error occurs? Error Message? Short-Dump? Return?

Read only

0 Likes
763

I've read a little bit the program for CJFN transaction.

The program exports the data to a Buffer, using this:

FM_CO_TRANSFER_SIM_TO_BUFFER

So, I think, but you should try, that you can re-import in your Zprogram the calculated data using the IMPORT statement.

Check out these line from Function Module:

   
    EXPORT S_COFP TO MEMORY ID 'G_S_COFP'.
    EXPORT S_COBK TO MEMORY ID 'G_S_COBK'.
    EXPORT DOC_COLL TO MEMORY ID 'G_DOC_COLL'.
    EXPORT COFP_DB TO MEMORY ID 'G_COFP_DB'.
    EXPORT COBK_DB TO MEMORY ID 'G_COBK_DB'.
    EXPORT BSEG_DB TO MEMORY ID 'G_BSEG_DB'.
    EXPORT BKPF_DB TO MEMORY ID 'G_BKPF_DB'.
    EXPORT EKKO_DB TO MEMORY ID 'G_EKKO_DB'.

Read only

Former Member
0 Likes
763

Run this program with EXPORTING LIST TO MEMORY. Then execute FMs LIST_FROM_MEMORY, WRITE_LIST and LIST_FREE_MEMORY for each submission. You will be able to keep the lists separate by company code in this way.

Rob