ALV probem after running GUI_UPLOAD

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Post Reply
sameng
Posts: 13
Joined: Thu Sep 25, 2003 9:43 pm

ALV probem after running GUI_UPLOAD

Post by sameng » Thu Nov 07, 2013 2:36 am

Hi Experts,

I am using GUI_UPLOAD to get data into internal table, and then use REUSE_ALV_GRID_DISPLAY to display a report, it always shows as a list(just like write), not a grid. If I comment statement GUI_UPLOAD, the result display as a grid.

I want to use GUI_LOAD and don't want to use ALV OO, so how can I display ALV as grid after running GUI_UPLOAD, anybody can give me some advices?

Thanks
Sam

Rich
Posts: 7116
Joined: Thu Oct 31, 2002 4:47 pm
Location: Liverpool
Contact:

Re: ALV probem after running GUI_UPLOAD

Post by Rich » Thu Nov 07, 2013 10:10 am

GUI_Upload should not affect your ALV.

Show us the code
Regards

Rich

Image
Abap KC:http://www.richard-harper.me.uk/Kb
SFMDR:http://www.se37.com

sameng
Posts: 13
Joined: Thu Sep 25, 2003 9:43 pm

Re: ALV probem after running GUI_UPLOAD

Post by sameng » Fri Nov 08, 2013 1:21 am

yes, GUI_UPLOAD doesn't affect ALV.
before ALV, I called bapi BAPI_PRODORD_CREATE, and I found sy-batch was set as 'X'.
So the ALV display as list, not grid.

Therefore before output ALV, I set sy-batch = '' and then ALV display as grid which is what I want.

Any better way?

Thanks
Sam

Rich
Posts: 7116
Joined: Thu Oct 31, 2002 4:47 pm
Location: Liverpool
Contact:

Re: ALV probem after running GUI_UPLOAD

Post by Rich » Fri Nov 08, 2013 3:08 am

BAPI_PRODORD_CREATE should not affect sy-batch either.

Post your code
Regards

Rich

Image
Abap KC:http://www.richard-harper.me.uk/Kb
SFMDR:http://www.se37.com

sameng
Posts: 13
Joined: Thu Sep 25, 2003 9:43 pm

Re: ALV probem after running GUI_UPLOAD

Post by sameng » Mon Nov 11, 2013 8:59 pm

Thanks rich.
Now everything is fine, and I delete statement: sy-batch = ''. I don't know why.

before display alv, I called below function, other codes are just processing internal table.
CALL METHOD cl_gui_frontend_services=>gui_upload
CALL FUNCTION 'BAPI_PRODORD_CREATE'
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' exporting wait = 'X'
CALL FUNCTION 'BAPI_PRODORD_RELEASE'
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' exporting wait = 'X'
CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_HDR'
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' exporting wait = 'X'

It's strange. This morning alv displayed as list occured once, but I ran program again, it's normal. :(
I think it maybe other reason ,not my code.

Post Reply