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

BDC Problem

Former Member
0 Likes
556

How Do Everyone!

I have recently coped an existing BDC program to a new

one and as usual this new one does not work. The first

problem I have encountered is that no recording seems

to be taking place. i.e. I run the ABAP code and look

in transaction SHDB. There are no entries matching upto

my session name.

I know I am asking a lot but I have included my code

below:

FORM process_data.

wa_sessi = 'VMSFB75'.

PERFORM session_open.

  • Set up Main Loop

LOOP AT customer_credit_record_tab INTO customer_credit_record_wa.

----


  • Convert Document Date to SAP format i.e. DD.MM.YYYY

----


CONCATENATE customer_credit_record_wa-document_date+0(2)

customer_credit_record_wa-document_date+3(2)

customer_credit_record_wa-document_date+6(4)

INTO customer_credit_record_wa-document_date

SEPARATED BY wa_period.

----


  • Convert Posting Date to SAP format i.e. DD.MM.YYYY

----


CONCATENATE customer_credit_record_wa-posting_date+0(2)

customer_credit_record_wa-posting_date+3(2)

customer_credit_record_wa-posting_date+6(4)

INTO customer_credit_record_wa-posting_date

SEPARATED BY wa_period.

----


  • Update internal table with formatted date and time

----


MODIFY customer_credit_record_tab FROM customer_credit_record_wa.

----


  • Screen - 1200

----


*

PERFORM bdc_dynpro USING 'SAPMF05A' '1200'.

----


H E A D E R I T E M -

  • Customer Number

PERFORM bdc_field USING 'BDC_CURSOR' 'INVFO-ACCNT'.

PERFORM bdc_field USING 'INVFO-ACCNT'

customer_credit_record_wa-customer.

  • Document Date

PERFORM bdc_field USING 'INVFO-BLDAT'

customer_credit_record_wa-document_date.

  • Reference

PERFORM bdc_field USING 'INVFO-XBLNR'

customer_credit_record_wa-reference.

  • Posting Date

PERFORM bdc_field USING 'INVFO-BUDAT'

customer_credit_record_wa-posting_date.

  • Amount

PERFORM bdc_field USING 'INVFO-WRBTR'

customer_credit_record_wa-amount_1.

  • Caclulate Tax

PERFORM bdc_field USING 'INVFO-XMWST'

customer_credit_record_wa-calculate_tax.

  • Header Text

PERFORM bdc_field USING 'INVFO-SGTXT'

customer_credit_record_wa-text_1.

----


L I N E I T E M S -

  • GL Account

PERFORM bdc_field USING 'ACGL_ITEM-HKONT(1)'

customer_credit_record_wa-gl_account.

  • Amount

PERFORM bdc_field USING 'ACGL_ITEM-WRBTR(1)'

customer_credit_record_wa-amount_2.

  • Header Text

PERFORM bdc_field USING 'ACGL_ITEM-HKONT(1)'

customer_credit_record_wa-gl_account.

  • Tax Code

PERFORM bdc_field USING 'ACGL_ITEM-MWSKZ(1)'

customer_credit_record_wa-tax_code.

  • Cost Centre

PERFORM bdc_field USING 'ACGL_ITEM-KOSTL(1)'

customer_credit_record_wa-cost_centre.

  • Order

PERFORM bdc_field USING 'ACGL_ITEM-AUFNR(1)'

customer_credit_record_wa-order.

  • Profit Centre

PERFORM bdc_field USING 'ACGL_ITEM-PRCTR(1)'

customer_credit_record_wa-profit_centre.

  • Assignment

PERFORM bdc_field USING 'ACGL_ITEM-ZUONR(1)'

customer_credit_record_wa-assignment_no.

  • Text

PERFORM bdc_field USING 'ACGL_ITEM-SGTXT(1)'

customer_credit_record_wa-text_2.

PERFORM bdc_field USING 'BDC_OKCODE' '/00'.

----


  • SAVE

----


*

PERFORM bdc_field USING 'BDC_OKCODE' '=BU'.

PERFORM session_insert USING 'FB75'.

PERFORM clear_bdc_data.

PERFORM end_transaction.

ENDLOOP.

PERFORM session_close.

ENDFORM. " process_data

Any ideas and suggestions would be very much appreciated.

Cheers

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
504

Hi Andy,

did you search your session NAme in <b>SM35</b> or in SHDB .. SM35 holds the session names in different states..

regards

satesh

3 REPLIES 3
Read only

Former Member
0 Likes
505

Hi Andy,

did you search your session NAme in <b>SM35</b> or in SHDB .. SM35 holds the session names in different states..

regards

satesh

Read only

0 Likes
504

Satesh,

Many thanks for your reply. I've just looked in SM35

and you are right that my session is there. I had

forgot all about SM35.

Cheers

Andy

Read only

0 Likes
504

Hi Scott,

This may not help for your quation beacuse satesh solved your problem, but i have one suggeation for all if you want to copy a program better copy through option avaible in SAP not just copy past,copy past will not copy includes selection text and Ect. if you copy from SAP option pls ignore it.

Thanks,

saleem.