Skip to Content
-1

Submit program returns less number of records

Oct 09, 2017 at 04:38 PM

148

avatar image
Former Member

Hi,

I'm using submit program to get ouput and process in my zprogram.

but the submit program returns less records, when compared to running directly the std report. and i'm using same variant and data on the selection screen.

submit program gets 48 record, where as the direct running std programs gets 1000+ records. does anybody know how this is set to return?

here is my code

SET PARAMETER ID 'KOK' FIELD 'WEC0'.
SUBMIT RPSISVG000
USING SELECTION-SET 'QUALITECH'
with  CN_PSPNR IN SO_POSID
      AND RETURN.
COMMIT WORK AND WAIT.

IMPORT I_ACT
  FROM MEMORY ID 'ZCN47N_ACTI'.
10 |10000 characters needed characters left characters exceeded

Not related to your question, but about the presence of COMMIT WORK AND WAIT after the SUBMIT: your commit is probably useless as usually SAP programs do an explicit commit themselves (because SAP often uses update tasks, and it's a good practice to do an explicit commit or rollback in an update report), you shouldn't need to do a commit yourself to commit the updates done in the program. Your commit can't launch the update tasks started from the submitted program. Your commit can just do a database commit. Your commit is just valid to start the update tasks started from your own program.

1
Former Member
Sandra Rossi

thanks sandra.

0
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Horst Keller
Oct 09, 2017 at 06:19 PM
6

Debug?

Share
10 |10000 characters needed characters left characters exceeded
Raymond Giuseppi
Oct 10, 2017 at 06:30 AM
1

I do have one doubt: CN_PSPNR look like internal format when SO_POSID look like external format...

NB: You use a variant in non-system space, so someday some user may (will) change its values... better use a CUS&xxx system (transported) variant or protect it during save.

Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

they are of the same format and I did take the values from SO_POSID and ran it in std program has more records count.
SO_POSID TYPE RANGE OF PRPS-POSID,

0

For testing could you add the option VIA SELECTION-SCREEN, is the same dynpro displayed that when calling transaction CN47N and selecting your variant?

Check also consistency between your variant QUALITECH and your own parameter IDs.

1
Former Member

Thanks Raymond.
via selection screen gave me a hint; that the selection screen has previous screen default first value from previous submit. actually i have two submits. first submit output is second submit input. and both std programs uses same initial screen. the second one is what i have problem with. may be i need to clear the screen before the second submit?

SUBMIT RPSISPE000
USING SELECTION-SET 'QUALITECH'
       AND RETURN.

SUBMIT RPSISVG000
VIA SELECTION-SCREEN
with  CN_PSPNR IN SO_POSID
      AND RETURN.<br>
0

Try to remove any unrequired parameter without value (the flag) in your variant also look for any no-display parameter that can be handled by the report.

1
Nic Teunckens Oct 09, 2017 at 07:59 PM
1

Program "RPSISVG000" is a Standard PS-Report and these make use of several Parameters :

  • DB-Profile ...
  • A set of Selection Parameters but also Additional Parameters to be Selected ...
  • Maybe a Default - or UserBased SelectionVariant that is Automatically selected wher running in Dialog?


I'm aware of a lot of Default Reports in the EAM-Space that use either fixed or initial Dates in Dialog, so that a Background Execution with no regard to these Dates will undoubtfully produce different results ... Maybe the same holds for this Report ...?

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Nic, yes initially the DB profile had problem, we did fix it using variant with DB-Profile saved, no idea what external parameters need to be selected. but i did submit using the variant i created just like i ran the std program.
USINGSELECTION-SET'QUALITECH'
and there are no dates on the selection screen.

0
avatar image
Former Member Oct 10, 2017 at 08:40 AM
0

Debugging will be the best option,check selection parameter/table

Share
10 |10000 characters needed characters left characters exceeded