Skip to Content

Batch Input related !! SM35 urgent!!

Hi!!

this is the code i m using for creating a batch input session & problem is that when i execute the program,the session can be viewed in the general overview tab bt the status is creating...

so what can possible reasons for it & what can be done??

help me !!

code is pasted below:

CALL FUNCTION 'BDC_OPEN_GROUP'

EXPORTING

group = 'AMIT'

keep = 'X'

user = sy-uname

EXCEPTIONS

group_invalid = 1

group_is_locked = 2

internal_error = 3

queue_error = 4

running = 5

system_lock_error = 6

user_invalid = 7

OTHERS = 8.

CASE sy-subrc.

WHEN '1'.

MESSAGE e021.

WHEN '2'.

MESSAGE e022.

WHEN '3'.

MESSAGE e023.

WHEN '4'.

MESSAGE e024.

WHEN '5'.

MESSAGE e025.

WHEN '6'.

MESSAGE e026.

WHEN '7'.

MESSAGE e027.

WHEN '8'.

MESSAGE e028.

ENDCASE.

LOOP AT gt_doc_header INTO gwa_doc_header.

READ TABLE gt_doc_item INTO gwa_doc_item INDEX sy-index.

CALL FUNCTION 'BAPI_ACC_MANUAL_ALLOC_POST'

EXPORTING

doc_header = gwa_doc_header

TABLES

doc_items = gt_doc_item

return = gt_return.

READ TABLE gt_return INTO gwa_return WITH KEY type = 'E'.

IF sy-subrc IS INITIAL.

REFRESH :gt_bdcdata.

PERFORM bdc_dynpro USING 'SAPLSPO4' '0300'.

PERFORM bdc_field USING 'BDC_CURSOR'

'SVALD-VALUE(01)'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=FURT'.

PERFORM bdc_field USING 'SVALD-VALUE(01)'

gwa_doc_header-co_area.

PERFORM bdc_dynpro USING 'SAPLK23F1' '1200'.

PERFORM bdc_field USING 'BDC_OKCODE'

'/00'.

PERFORM bdc_field USING 'COHEADER-SEND_REC_REL'

'01SAP'.

PERFORM bdc_field USING 'RK23F-STATUS'

'S'.

PERFORM bdc_field USING 'COHEADER-BLTXT'

gwa_doc_header-doc_hdr_tx.

PERFORM bdc_field USING 'COHEADER-PERIO'

gwa_doc_header-period.

PERFORM bdc_field USING 'RK23F-KSTAR'

gwa_doc_item-cost_elem.

PERFORM bdc_field USING 'RK23F-WTGBTR'

gwa_doc_item-value_tcur.

PERFORM bdc_field USING 'RK23F-WAERS'

gwa_doc_header-trans_curr.

PERFORM bdc_field USING 'RK23F-SKOSTL'

gwa_doc_item-send_cctr.

PERFORM bdc_field USING 'BDC_CURSOR'

'RK23F-EKOSTL'.

PERFORM bdc_field USING 'RK23F-EKOSTL'

gwa_doc_item-rec_cctr.

PERFORM bdc_dynpro USING 'SAPLK23F1' '1200'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=POST'.

PERFORM bdc_field USING 'COHEADER-SEND_REC_REL'

'01SAP'.

PERFORM bdc_field USING 'RK23F-STATUS'

'S'.

PERFORM bdc_field USING 'COHEADER-PERIO'

gwa_doc_header-period.

PERFORM bdc_field USING 'BDC_CURSOR'

'RK23F-KSTAR'.

PERFORM bdc_field USING 'RK23F-WAERS'

gwa_doc_header-trans_curr.

CALL FUNCTION 'BDC_INSERT'

EXPORTING

tcode = 'KB15N'

TABLES

dynprotab = gt_bdcdata

EXCEPTIONS

internal_error = 1

not_open = 2

queue_error = 3

tcode_invalid = 4

posting_invalid = 5

OTHERS = 6.

CASE sy-subrc.

WHEN '1'.

MESSAGE e023.

WHEN '2'.

MESSAGE e031.

WHEN '3'.

MESSAGE e024.

WHEN '4'.

MESSAGE e032.

WHEN '5'.

MESSAGE e033.

WHEN '6'.

MESSAGE e028.

ENDCASE.

ENDIF.

ENDLOOP.

CALL FUNCTION 'BDC_CLOSE_GROUP'

EXCEPTIONS

not_open = 1

queue_error = 2

OTHERS = 3.

CASE sy-subrc.

WHEN '1'.

MESSAGE e031.

WHEN '2'.

MESSAGE e042.

WHEN '3'.

MESSAGE e043.

ENDCASE.

Thanks & Regards

@mit.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 05:33 PM

    Hi,

    I noticed one issue that 'BAPI_COMMIT' is missing after the BAPI call.

    Did you see what's happening in 'De-bug' mode? Did it reach the 'BDC_INSERT' function module?

    Give some more details on the issue!

    Cheers!

    Sam Kandas

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.