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

Submit Report....and ALV.. PRoblem

Former Member
0 Likes
5,650

Hi,

I am using a calling program ZCALL to submit a ZTEST program. Now the ALV_LIST_DISPLAY is used in the submit program ZTEST.

When I am executing the program ZCALL in foreground i am able to get the ALV outpput.

but when I am executing ZCALL in background, I am unable to get the ALV output...

But whn I am executing ZTEST in background I am able to get the ALV....

Hi,

I am using a calling program ZCALL to submit a ZTEST program. Now the ALV_LIST_DISPLAY is used in the submit program ZTEST.

When I am executing the program ZCALL in foreground i am able to get the ALV outpput.

but when I am executing ZCALL in background, I am unable to get the ALV output...

But whn I am executing ZTEST in background I am able to get the ALV....

8 REPLIES 8
Read only

Former Member
0 Likes
3,182

Hi Abhay,

Are you using only SUBMIT or SUBMIT AND RETURN

if you are specifying RETURN as you are running in backgroung mode there is no one to send the screen back(USING F3 or BACK) to the called program, so it wont display the ALV but just goes back to the calling program.

Please try describe as clear as possible

Best Regards

Ramchander Rao.K

Edited by: ramchander krishnamraju on Dec 18, 2008 10:04 AM

Read only

0 Likes
3,182

When you run a report in background the output will not be generated and instead you will get it as a spool.

Don't understand how in second case your are getting your ALV output.

Explain if there is any actual requirement.

Read only

Former Member
0 Likes
3,182

Hi,

In program 'zcall' do the following :

submit ztest exporting list to memory.

then call the function module 'list_from_memory' .This function module will retrieve a list from ABAP memory and place it in the table LISTOBJECT.

By using the function module 'DISPLAY_LISTu2019 the list stored in container LISTOBJECT is once again displayed as a list.

Read only

Former Member
0 Likes
3,182

hi

i have a similar problem with submitting and returning from a standard report which has alv grid display

i was using submit with paramaters exporting list to memory and return, but this was not working.

can anybody please suggest any method other than making a z program and

modifying as in our project it would be very difficult to get approvals for that.

thanks,

shaik.

Read only

0 Likes
3,182

Depends on the report.

Which one are you using?

Read only

sada_gandla2
Explorer
3,182

after calling the method cl_salv_bs_runtime_info=>get_data_ref( )

clear with below method

cl_salv_bs_runtime_info=>clear_all().
Read only

0 Likes
3,182

Hi, please refer to next example. Please, check the Function Modules that you need to use in your zcall program. After execution of FM LIST_TO_ASCI, the lt_listasci internal table has the result of ZTEST's ALV in this case, RM07MLBS program.

FORM f_get_information .

  DATA: gt_mb52        TYPE STANDARD TABLE OF ty_mb52,
	    gt_submit_mb52 TYPE STANDARD TABLE OF abaplist.

  DATA: lr_matkl TYPE RANGE OF matkl,
        lr_ekgrp TYPE RANGE OF ekgrp,
        lr_sobkz TYPE RANGE OF sobkz.

  TYPES: BEGIN OF ty_listasci,
           line TYPE char1024,
         END OF ty_listasci.

  DATA: lt_listasci  TYPE STANDARD TABLE OF ty_listasci,
        lv_index     TYPE i,
        ls_structure TYPE ty_mb52.

*--- Se llama el programa RM07MLBS (TCode MB52) con los parametros de
*--- entrada: Material, Centro, Almacén y Lote.
  REFRESH: gt_submit_mb52,
           gt_mb52,
           lr_matkl,
           lr_ekgrp,
           lr_sobkz.

  CALL FUNCTION 'LIST_FREE_MEMORY'
    TABLES
      listobject = gt_submit_mb52.

  SUBMIT rm07mlbs WITH matnr    IN so_matnr
                  WITH werks    IN so_werks
                  WITH lgort    IN so_lgort
                  WITH charg    IN so_charg
                  WITH matart   IN so_mtart
                  WITH matkla   IN lr_matkl
                  WITH ekgrup   IN lr_ekgrp
                  WITH so_sobkz IN lr_sobkz
                  WITH pa_sond  EQ 'X'
                  WITH negativ  EQ ' '
                  WITH xmchb    EQ 'X'
                  WITH nozero   EQ 'X'
                  WITH novalues EQ ' '
                  WITH pa_hsq   EQ ' '
                  WITH pa_flt   EQ 'X'
                  WITH p_vari   EQ '/SBMT' EXPORTING LIST TO MEMORY AND RETURN.

  CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
      listobject = gt_submit_mb52
    EXCEPTIONS
      not_found  = 1
      OTHERS     = 2.

  IF sy-subrc EQ 1.
    MESSAGE TEXT-e05 TYPE 'E'.
  ELSEIF sy-subrc EQ 2.
    MESSAGE TEXT-e10 TYPE 'E'.
  ENDIF.

  CALL FUNCTION 'LIST_TO_ASCI'
    TABLES
      listasci           = lt_listasci
      listobject         = gt_submit_mb52
    EXCEPTIONS
      empty_list         = 1
      list_index_invalid = 2
      OTHERS             = 3.

  IF sy-subrc NE 0.
    MESSAGE TEXT-e15 TYPE 'E'.
  ENDIF.

  DELETE lt_listasci FROM 1 TO 3.

ENDFORM.

Regards.

Read only

oguzhans
Explorer
0 Likes
3,182

Hi,

You can use the sample code below:

  cl_salv_bs_runtime_info=>set( display  = abap_false
                                metadata = abap_false
                                data     = abap_true ).

  SUBMIT rcs15001 WITH pm_idnrk = iv_idnrk
                  WITH pm_werks = iv_werks
                  WITH pm_mehrs = 'X' "Multilevel
                  AND RETURN .
  TRY.
      cl_salv_bs_runtime_info=>get_data_ref( IMPORTING r_data = DATA(lobj_data) ).
      ASSIGN lobj_data->* TO FIELD-SYMBOL(<lfs_data>).
    CATCH cx_salv_bs_sc_runtime_info.
  ENDTRY.

  IF <lfs_data> IS ASSIGNED.
    DATA: lt_stpov_alv TYPE TABLE OF stpov_alv.
    lt_stpov_alv = CORRESPONDING #( <lfs_data> ).
  ENDIF.