‎2006 Mar 15 9:45 AM
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'.
----
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.
----
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
‎2006 Mar 15 9:53 AM
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
‎2006 Mar 15 9:53 AM
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
‎2006 Mar 15 10:02 AM
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
‎2006 Mar 15 2:21 PM
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.