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

passing internal table to sap script

Former Member
0 Likes
1,948

Dear all,

I have passed internal table values as standard text into sap script. The table values are coming in dev and qas server.  while executing in production , it shows as follows instead of table values.

Standard text is existing in production server with this following text.

Please resolve my problem...

Waiting for the reply...

Regards,

Dhivya N.

Dear all,

I have passed internal table values as standard text into sap script. The table values are coming in dev and qas server.  while executing in production , it shows as follows instead of table values.

Standard text is existing in production server with this following text.

Please resolve my problem...

Waiting for the reply...

Regards,

Dhivya N.

4 REPLIES 4
Read only

Former Member
0 Likes
1,350

is this the screenshot of the formular?

Read only

0 Likes
1,350

hi stefan and jelena,

i modified one standard sap script

my required sap script output is (i got in development and quality server)

I am passing these values to sap script through include standard text.

INCLUDE ZQM_INSP_DETECT OBJECT TEXT ID ST LANGUAGE EN

in my program. the table values are passed to standard text as

wa_header-tdobject = 'TEXT'.

WA_HEADER-TDNAME = 'ZQM_INSP_DETECT'.

     wa_header-tdid = 'ST'.

     wa_header-tdspras = 'E'.

***passing the table values into the standard text***

     CALL FUNCTION 'SAVE_TEXT'

       EXPORTING

        CLIENT                = SY-MANDT

        HEADER                = WA_HEADER

        INSERT                = 'X'

        SAVEMODE_DIRECT       = 'X'

       TABLES

         LINES                 = TA_TEXT

      EXCEPTIONS

        ID                    = 1

        LANGUAGE              = 2

        NAME                  = 3

        OBJECT                = 4

        OTHERS                = 5

               .

     IF SY-SUBRC <> 0.

     ENDIF.

  ELSE.

    clear ta_text.

   exit.

ENDIF.

clear wa_header.



Problem:

I got the output in development and quality server. but checking in production instead of values , the output looks as

hope you understand....

Regards,

Dhivya N.

Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
1,350

Like Stefan, I also didn't quite get the question. However, when there is a different behavior in two environments than obviously some analysis needs to be done regarding the differences between the two. What has been done so far to troubleshoot this?

Going forward, please refer to these blogs on how to post questions on SCN:

http://scn.sap.com/community/getting-started/blog/2010/05/12/asking-good-questions-in-the-forums-to-...

http://scn.sap.com/community/about/blog/2014/01/12/landing-page-for-the-troublemakers

http://scn.sap.com/community/about/blog/2014/04/18/before-you-ask

Read only

Former Member
0 Likes
1,350

Hi

its very hard to tell what the mistake is... because sap-script sometimes is  very "sensitive"

i think u need to debug to figure out where the bug is.

here are some hints u may look at:

  • the Text "Complies with Chart 000 000" looks very differnet to what u expect. It might be that the wrong "Text" is used in SAP-Script. Maybe u have to "commit work" after saving Text
  • U got a Table displayed. As far as i got the idea of ur programm. U just save the Table Content in ur internal Table. The table (the printed boxes) itself comes from somewhere else? maybe this "overwrite" ur table content.
  • as u got a difference bewteen production and development server  it may be caused by the SO10-Text elements because thats the only element that can be changed in production without Transport from development server.
  • u need to debug ur programm step by step and need to check if the SO10-Text is what u expect it to be. maybe try to figure out if u get another result when u set breakpoint after save-text (that would agree to the idea of missing "commit work")
  • check if u can find the Text "complies to chart" somewhere. this may be the place where ur table gets "overwritten" maybe if u got different windows at the same place. For example if u use a seperate window to print the table boxes and in this window u got a "dummy text" or another "write form" somewhere in a sub-routine overwrites the window u put ur SO10-Text in.

regards

Stefan