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: 

Write out some fields for zprogram and open FI doc

Former Member
0 Kudos

My zprogram source code is like this:

PARAMETERS: OUTFILE(80).
 
data: begin of oldrec occurs 0,
        txt1(250),
        txt2(250),
      end of oldrec.
 
start-of-selection.
 
call function 'UPLOAD'
  tables data_tab = oldrec
  exceptions others = 1.
 
if sy-subrc ne 0.
  write:/ 
else.
  open dataset outfile for output in text mode.
  if sy-subrc = 0.
    loop at oldrec.
      transfer oldrec to outfile.
    endloop.
    close dataset outfile.
    if sy-subrc = 0.
      write:/ 
    else.
      write:/ 
    endif.
  else.
    write:/ 
  endif.
endif.
SUBMIT Z_FI_MEDJUNARODNI_OBRACUN_FIKS AND RETURN.
SUBMIT RSBDCSUB AND RETURN.

How to modify code to get these fields in report output?

Should I put SELECT in my main zprogram or in the zprogram I call with SUBMIT??

Do you have idea?

My output should look like this:

TIME

DATE

BKPF-USNAM

BSEG-BELNR (for one or more vendors from the file I upload)

Double click on each BELNR should open my FI document.

Thank you guys

Nihad

5 REPLIES 5

Former Member
0 Kudos

Hi guys,

In my program I first upload file, then I submit Zprogram that does posting, and then I process session in background without need to call SM35 separately. FI document is posted.

Now, I want in report output to print 4 fields I mantioned above.

SY TIME

SY DATE

USNAM

BELNR

BELNR may be one or more depending on number of vendors in txt file I use to upload.

How to do this in my code?

Thanks a lot,

Nihad

Former Member
0 Kudos

Do you have any idea how to solve this problem with output fields?

Also when I run program the screen with list of sessions appears. I don't want it to appear

how to skip this screen?

Batch input: Process all sessions still to be processed 21.10.2008

Time Session Date Time Job no. Queue ID

11:27:25 MF21102008 21.10.2008 11:27:23 11272501 08102111272342242455

11:27:25 KLASIF_PM 18.09.2002 10:44:03 11272501 02091810440123320001

Submit RSDBCBTC not successfully executed (see SYSLOG)

11:27:25 IBIP09171150 17.09.2002 11:50:39 11272501 02091711503804280002

Submit RSDBCBTC not successfully executed (see SYSLOG)

11:27:25 TUMOBL080901 20.08.2008 09:01:28 11272501 08082009012878202225

11:27:25 TUMOBL080856 20.08.2008 08:56:58 11272501 08082008565825200933

11:27:25 TUMOBL080844 20.08.2008 08:44:43 11272501 08082008444325200929

*******************************************************************************************************

Former Member
0 Kudos

Friends, I am waiting for your replies I need to modify code to print out some fields from BSEG and BKPF.

Nihad

0 Kudos

If you've already got the fields you want to output in your program, then it should be a fairly easy task to output them as a report. Look up the SAP help on the WRITE command (if you want a very simple report) or on ALV (if you want something more complex).

Former Member
0 Kudos

Duplicate posts:

Please close one.