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

Query regarding SM58 execution in Background

Former Member
0 Likes
665

HI,

Please guide me whether SM58 can be scheduled in the background will automatically take care of LUW execution?

Or do i need to write a BDC for SM58 and execute the BDC in Background?

Thank you.

Edited by: Sanjay_lnt on Feb 11, 2010 6:08 AM

Edited by: Sanjay_lnt on Feb 11, 2010 6:09 AM

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
593

You need to submit RSARFCSE instead of writing bdc on sm58. If you check the code inside the SM58.


    when 'EXEC'.
      dbg = space.
      export dbg to memory  id '%_arfc_debug'.
      perform execute_line.
      perform redisplay.

if you check the execute_line form


form execute_line.

  if acttid is initial.
    message e015.
  endif.
  %_reserv = arfcsstate-arfcreserv.    "Cast auf Struktur %_RESERV
  if %_reserv-mandt <> sy-mandt.
    message e040 with %_reserv-mandt.
  endif.

  if arfcsstate-arfcstate <> executed.
    if dbg <> space.
      select single * from rfcdes
        where rfcdest = arfcsstate-arfcdest.
      if ( sy-subrc = 0 and rfcdes-rfctype = 'T' ).
        message e361(sy) with rfcdes-rfctype.
      endif.
    endif.
    submit rsarfcse and return with tid = acttid
                               with forced = 'X'.
  elseif valid_line = space.
    message e015.
  else.
    message e016.
  endif.
endform.

HI,

Please guide me whether SM58 can be scheduled in the background will automatically take care of LUW execution?

Or do i need to write a BDC for SM58 and execute the BDC in Background?

Thank you.

Edited by: Sanjay_lnt on Feb 11, 2010 6:08 AM

Edited by: Sanjay_lnt on Feb 11, 2010 6:09 AM

2 REPLIES 2
Read only

gaursri
Active Contributor
0 Likes
593

Hi Sanjay,

Please have a look on this thread thugh marked unanswered but the person found the solution himself.

Link:[SM58|;

Hoping your query resolves soon.

Have a best day ahead.

Read only

former_member194669
Active Contributor
0 Likes
594

You need to submit RSARFCSE instead of writing bdc on sm58. If you check the code inside the SM58.


    when 'EXEC'.
      dbg = space.
      export dbg to memory  id '%_arfc_debug'.
      perform execute_line.
      perform redisplay.

if you check the execute_line form


form execute_line.

  if acttid is initial.
    message e015.
  endif.
  %_reserv = arfcsstate-arfcreserv.    "Cast auf Struktur %_RESERV
  if %_reserv-mandt <> sy-mandt.
    message e040 with %_reserv-mandt.
  endif.

  if arfcsstate-arfcstate <> executed.
    if dbg <> space.
      select single * from rfcdes
        where rfcdest = arfcsstate-arfcdest.
      if ( sy-subrc = 0 and rfcdes-rfctype = 'T' ).
        message e361(sy) with rfcdes-rfctype.
      endif.
    endif.
    submit rsarfcse and return with tid = acttid
                               with forced = 'X'.
  elseif valid_line = space.
    message e015.
  else.
    message e016.
  endif.
endform.