Skip to Content
0
Former Member
Dec 08, 2008 at 06:50 AM

Sample BDC program

8009 Views

Hi,

I have recorded a bdc for ABZON.It was working fine.I want to change this to call transaction.Can anyone help me how to do this.

I have put call transaction in below code,but its showing error like 'Initial screen problem'.

Canu check this code and plz tell me where and how to use call transaction..

report ZABZON_UPLOAD

no standard page heading line-size 255.

data : begin of itab OCCURS 0,

asnum type RAIFP2-ANLN1,

doc_date(10), "type RAIFP1-BLDAT,

pos_date(10), "type RAIFP1-BUDAT,

asval_date(10)," type RAIFP1-BZDAT,

amt_posted(13), " type RAIFP2-ANBTR,

qty(13), " type RAIFP2-MENGE,

uom type RAIFP2-MEINS,

txt type RAIFP2-SGTXT,

end of itab.

itab-asnum = '1750265'.

itab-doc_date = '29.11.2007'.

itab-pos_date = '02.12.2007'.

itab-asval_date = '02.12.2007'.

itab-amt_posted = '2211'.

itab-qty = '3'.

itab-uom = 'PC'.

itab-txt = 'Test BDC'.

append itab.

include bdcrecx1.

start-of-selection.

perform open_group.

loop at itab.

perform bdc_dynpro using 'SAPLAMDP' '0100'.

perform bdc_field using 'BDC_OKCODE'

'=SAVE'.

perform bdc_field using 'RAIFP3-XBANL'

'X'.

perform bdc_field using 'RAIFP2-ANLN1'

itab-asnum. "'1750263'.

perform bdc_field using 'RAIFP1-BLDAT'

itab-doc_date. "'30.11.2007'.

perform bdc_field using 'RAIFP1-BUDAT'

itab-pos_date. "'01.12.2007'.

perform bdc_field using 'RAIFP1-BZDAT'

itab-asval_date. "'01.12.2007'.

perform bdc_field using 'RAIFP2-ANBTR'

itab-amt_posted. " '6666'.

perform bdc_field using 'RAIFP2-MENGE'

itab-qty. "'1'.

perform bdc_field using 'RAIFP2-MEINS'

itab-uom. "'PC'.

perform bdc_field using 'BDC_CURSOR'

'RAIFP2-SGTXT'.

perform bdc_field using 'RAIFP2-SGTXT'

itab-txt ."'Evaluation of checking'.

perform bdc_transaction using 'ABZON'.

  • call TRANSACTION 'ABZON' USING itab MODE 'A'.

perform close_group.

endloop.