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

Application server file is not getting updated properly

Former Member
0 Likes
787

Hi,

I was trying to upload one file in application server. I wrote the below code.

  OPEN DATASET lv_app_down FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

  IF sy-subrc = 0.

    LOOP AT pt_table ASSIGNING <fs_table>.

      TRANSFER <fs_table> TO lv_app_down.

    ENDLOOP.

  ELSE.

In debug mode I checked that the field symbol <fs_table> has proper value with 42 columns. But after the execution the file is having only 40 columns. Any guess why this is happening..

Thanks,

Supratik

1 ACCEPTED SOLUTION
Read only

reachdebopriya
Active Participant
0 Likes
756

Hi Supratik,

Use Command CONDENSE before populating the data of table pt_table.

It should work then.

Thanks and Regards,

Debopriya Ghosh

This message was moderated.

5 REPLIES 5
Read only

Former Member
0 Likes
756

Hi

What about close dataset? Do you have it in your code ?

Read only

reachdebopriya
Active Participant
0 Likes
756

This message was moderated.

Read only

Former Member
0 Likes
756

I have used close dataset. But still its not working. Below is the code for my subroutine

FORM f_dump_application_server  USING pv_prog_name TYPE string

                                      pt_table TYPE table.

  DATA: lv_app_down TYPE string.

  FIELD-SYMBOLS: <fs_table> TYPE any.

* Generating download file paths

  PERFORM f_generate_phy_file USING pv_prog_name

                           CHANGING lv_app_down.

  OPEN DATASET lv_app_down FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

  IF sy-subrc = 0.

    LOOP AT pt_table ASSIGNING <fs_table>.

      TRANSFER <fs_table> TO lv_app_down.

    ENDLOOP.

  ELSE.

    MESSAGE s944(zmtw_fr) DISPLAY LIKE 'E' WITH lv_app_down.

  ENDIF.

  CLOSE DATASET lv_app_down.

ENDFORM.                    " F_DUMP_APPLICATION_SERVER

Read only

0 Likes
756

Hi,

Is there any seperator to identify number of columns? May be the last 2 column values are blank because of which you are not able to see.

Regards,

Swarna

Read only

reachdebopriya
Active Participant
0 Likes
757

Hi Supratik,

Use Command CONDENSE before populating the data of table pt_table.

It should work then.

Thanks and Regards,

Debopriya Ghosh