on 10-19-2005 9:44 AM
Hi
Im creating BDC for F-28. But it got error coming out.
>> It says DB05B-PSZAH(02) is not an input field.
What I do is: First, I search for Line Item then Document Number. Then It return to basic list. Then I loop again for the second Line Item Number and Document Number.
I can activate the first amount but cannot for the next amount and so on.
Anybody could help me on this??
Is there any BAPI for Post Incoming Payment (F-28)?
Thank you.
Regards.
Hi,
try to solve your problem with rfbibl00 and
structures bselk/bselp
in bdc try dynpro 733:
function-code <b>SLB</b> and you can match single fi-documents (belnr/gjahr/buzei)
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
look here:
1)there's a documentation in se38
2) http://help.sap.com/saphelp_45b/helpdata/en/e9/cb8a85eb0011d184650000e8a6bfbe/content.htm
Andreas
i dont think there is a BAPI for this Transaction...
i have done a BDC on F-28 myself....pasting the code....hope it helps you....
*******NOTE********
the parameter in the subroutine is to see if there is a single document or multiple documents being posted.
*********************
FORM fill_bdc_data_f-28_9005 USING p_i_mult_doc TYPE c.
**BDC from screen 9005
DATA : l_amt_bdc(13), l_amt_bdc_remain(13), l_amt_bdc_mult(13),
l_amt_bdc_mult_remain(13), l_assignment(14), l_period(2),
l_amount(13).
CLEAR t_bdcdata.
REFRESH t_bdcdata.
PERFORM bdc_dynpro USING 'SAPMF05A' '0103'.
PERFORM bdc_field USING 'BDC_OKCODE' '=AB'. "OK CODE - doc overview
**get user default date format and pass date in that format
PERFORM convert_date_to_user_format USING bkpf-bldat.
PERFORM bdc_field USING 'BKPF-BLDAT' w_date. "cheque date
CLEAR w_date.
PERFORM bdc_field USING 'BKPF-BLART' i_blart. "doc type
PERFORM bdc_field USING 'BKPF-BUKRS' i_bukrs. "comp code
**get user default date format and pass date in that format
PERFORM convert_date_to_user_format USING bkpf-budat.
PERFORM bdc_field USING 'BKPF-BUDAT' w_date. "posting date
CLEAR w_date.
l_period = sy-datum+4(2).
PERFORM bdc_field USING 'BKPF-MONAT' l_period. "period
PERFORM bdc_field USING 'BKPF-WAERS' 'INR'. "currency
PERFORM bdc_field USING 'BKPF-BKTXT' i_bankl. "doc. hdr. text
PERFORM bdc_field USING 'BKPF-XBLNR' i_xblnr. "Ref. Document No.
PERFORM bdc_field USING 'BSEG-ZUONR' i_zuonr. "Assignment(Depot Code)
PERFORM bdc_field USING 'RF05A-KONTO' i_bank_gl. "Bank GL acc
PERFORM bdc_field USING 'BSEG-GSBER' i_gsber. "Business Area
l_amount = bseg-wrbtr.
PERFORM bdc_field USING 'BSEG-WRBTR' l_amount. "Amount
PERFORM bdc_field USING 'BSEG-PRCTR' ''. "Profit Center
**open items data
PERFORM bdc_field USING 'RF05A-AGKOA' 'D'. "Acc type (D=customers)
PERFORM bdc_field USING 'RF05A-XNOPS' 'X'. "Std OIs check box
**end of first screen
**document overview screen
PERFORM bdc_dynpro USING 'SAPMF05A' '0700'. "Overview Screen
PERFORM bdc_field USING 'BDC_CURSOR' 'RF05A-AZEI1(01)'. "cursor
PERFORM bdc_field USING 'BDC_OKCODE' '/00'. "OK CODE
PERFORM bdc_field USING 'RF05A-NEWBS' '19'. "posting key
PERFORM bdc_field USING 'RF05A-NEWKO' i_kunnr. "customer
PERFORM bdc_field USING 'RF05A-NEWUM' 'B'. "Spl GL Indicator
**for single document selected
CLEAR l_amt_bdc.
IF p_i_mult_doc = ''.
***new screen - next line item
PERFORM bdc_dynpro USING 'SAPMF05A' '0303'.
PERFORM bdc_field USING 'BDC_OKCODE' '=BU'. "OK CODE
**for single document, use the bouncing amount calculated earlier
l_amt_bdc = w_amt_ant_bouncing.
PERFORM bdc_field USING 'BSEG-WRBTR' l_amt_bdc. "amount
**due date - same as posting date on screen
**get user default date format and pass date in that format
PERFORM convert_date_to_user_format USING bkpf-budat.
PERFORM bdc_field USING 'BSEG-ZFBDT' w_date. "due date
CLEAR w_date.
**assignment
CLEAR l_assignment.
CONCATENATE t_seldoc_ant_bouncing-belnr
t_seldoc_ant_bouncing-gjahr INTO l_assignment.
PERFORM bdc_field USING 'BSEG-ZUONR' l_assignment. "assignment
PERFORM bdc_field USING 'BSEG-GSBER' i_gsber.
**if there is some remaining amount, then go for another line item
IF w_rem_amt_ant_bouncing > 0.
PERFORM bdc_field USING 'RF05A-NEWBS' '15'. "posting key
PERFORM bdc_field USING 'RF05A-NEWKO' i_kunnr. "customer
**new screen
PERFORM bdc_dynpro USING 'SAPMF05A' '0301'.
PERFORM bdc_field USING 'BDC_CURSOR' 'BSEG-ZTERM'. "CURSOR
PERFORM bdc_field USING 'BDC_OKCODE' '=BU'. "OK CODE-ENTER
l_amt_bdc_remain = w_rem_amt_ant_bouncing.
PERFORM bdc_field USING 'BSEG-WRBTR' l_amt_bdc_remain.
PERFORM bdc_field USING 'BSEG-ZTERM' '0001'.
**AGAIN
PERFORM bdc_dynpro USING 'SAPMF05A' '0301'.
PERFORM bdc_field USING 'BDC_CURSOR' 'BSEG-WRBTR'. "CURSOR
PERFORM bdc_field USING 'BDC_OKCODE' '=BU'. "OK CODE-SAVE
PERFORM bdc_field USING 'BSEG-WRBTR' l_amt_bdc_remain.
PERFORM bdc_field USING 'BSEG-ZTERM' '0001'. "pmt term -hardcoded
PERFORM bdc_field USING 'BSEG-SKFBT' l_amt_bdc_remain.
ENDIF.
**multiple documents
ELSE.
**initialize remaining amount to amt entered on screen
l_amt_bdc_mult_remain = bseg-wrbtr.
LOOP AT t_seldoc_ant_bouncing.
IF l_amt_bdc_mult_remain > 0.
IF bseg-wrbtr > t_seldoc_ant_bouncing-rem_amt.
l_amt_bdc_mult = t_seldoc_ant_bouncing-rem_amt.
ELSE.
l_amt_bdc_mult = bseg-wrbtr.
ENDIF.
**remaining amt = screen amt - amt calculated above.
l_amt_bdc_mult_remain = l_amt_bdc_mult_remain - l_amt_bdc_mult.
PERFORM bdc_dynpro USING 'SAPMF05A' '0303'.
PERFORM bdc_field USING 'BDC_OKCODE' '=BU'. "OK CODE
PERFORM bdc_field USING 'BSEG-WRBTR' l_amt_bdc_mult. "amount
PERFORM bdc_field USING 'BSEG-GSBER' i_gsber. "Business Area
**due date - same as posting date on screen
**get user default date format and pass date in that format
PERFORM convert_date_to_user_format USING bkpf-budat.
PERFORM bdc_field USING 'BSEG-ZFBDT' w_date. "due date
CLEAR w_date.
**assignment
CLEAR l_assignment.
CONCATENATE t_seldoc_ant_bouncing-belnr
t_seldoc_ant_bouncing-gjahr INTO l_assignment.
PERFORM bdc_field USING 'BSEG-ZUONR' l_assignment. "assignment
**posting key 19 for all but last document
PERFORM bdc_field USING 'RF05A-NEWBS' '19'. "posting key
PERFORM bdc_field USING 'RF05A-NEWKO' i_kunnr. "customer
PERFORM bdc_field USING 'RF05A-NEWUM' 'B'. "Spl GL
ENDIF.
ENDLOOP.
ENDIF.
**post remaining amount
IF p_i_mult_doc = 'X'.
**new screen if there is some amount left
IF l_amt_bdc_mult_remain > 0.
**posting key 15 with remaining amount
PERFORM bdc_field USING 'RF05A-NEWBS' '15'. "posting key
PERFORM bdc_field USING 'RF05A-NEWKO' i_kunnr. "customer
PERFORM bdc_field USING 'RF05A-NEWUM' ''. "Spl GL
**new screen
PERFORM bdc_dynpro USING 'SAPMF05A' '0301'.
PERFORM bdc_field USING 'BDC_OKCODE' '=BU'. "OK CODE
PERFORM bdc_field USING 'BSEG-WRBTR' l_amt_bdc_mult_remain.
PERFORM bdc_field USING 'BSEG-ZTERM' '0001'. "pmt term - hardcoded
ELSE.
**if no amount is left, no need for a further line item
PERFORM bdc_field USING 'RF05A-NEWBS' ''. "posting key
PERFORM bdc_field USING 'RF05A-NEWKO' ''. "customer
PERFORM bdc_field USING 'RF05A-NEWUM' ''. "Spl GL
ENDIF.
ENDIF.
**clear variables
CLEAR : l_amount, l_assignment, l_amt_bdc,
l_amt_bdc_remain,l_amt_bdc_mult, l_amt_bdc_mult_remain.
ENDFORM. " fill_bdc_data_F-28_9005
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Ok. Im trying to use your code. But before that, I have a few questions.
1. Where is the Document Number that I need to pass to be knock-off?
2. Could you tell me >> w_rem_amt_ant_bouncing?
My Post Incoming Payment scenario:
1. Search Line Item Number
2. Search Document Number
3. Back to Basic List
4. Loop to No. 1 again.
5. Then Post.
Thank you.
Regards.
well...may be copying the code will not suffice for you as your requirement will be quite different...
i am getting the document number selected by the user on the screen...
w_rem_amt_ant_bouncing is a variable that i am using to distribute amount entered by user across multiple documents that he may select for payments against which there is an anticipated bouncing (this is probably peculiar to my requirement)...
******************************************
my idea to paste the code was to give u a bit of hint on how to carry our a bdc on F-28...
here is a code that is a bit more general....hope it helps
******************************************
FORM fill_bdc_data_f-28.
DATA : l_period(2), "for holding month (period) value
l_amount(13). "used for amt while posting F-28
CLEAR t_bdcdata.
REFRESH t_bdcdata.
PERFORM bdc_dynpro USING 'SAPMF05A' '0103'.
IF t_open_items[] IS NOT INITIAL.
PERFORM bdc_field USING 'BDC_OKCODE' 'PA'. "OK CODE - open items
ELSE.
PERFORM bdc_field USING 'BDC_OKCODE' 'AB'. "OK CODE - doc overview
ENDIF.
**get user default date format and pass date in that format
PERFORM convert_date_to_user_format USING bkpf-bldat.
PERFORM bdc_field USING 'BKPF-BLDAT' w_date. "cheque date
CLEAR w_date.
PERFORM bdc_field USING 'BKPF-BLART' i_blart. "doc type
PERFORM bdc_field USING 'BKPF-BUKRS' i_bukrs. "comp code
**get user default date format and pass date in that format
PERFORM convert_date_to_user_format USING bkpf-budat.
PERFORM bdc_field USING 'BKPF-BUDAT' w_date. "cheque date
CLEAR w_date.
l_period = sy-datum+4(2).
PERFORM bdc_field USING 'BKPF-MONAT' l_period. "period
PERFORM bdc_field USING 'BKPF-WAERS' 'INR'. "currency
PERFORM bdc_field USING 'BKPF-BKTXT' i_bankl.
PERFORM bdc_field USING 'BKPF-XBLNR' i_xblnr. "Ref. Document No.
PERFORM bdc_field USING 'RF05A-KONTO' i_bank_gl. "Bank GL acc
PERFORM bdc_field USING 'RF05A-KONTO' '1310176'. "Bank GL acc
PERFORM bdc_field USING 'BSEG-GSBER' i_gsber. "Business Area
l_amount = bseg-wrbtr.
PERFORM bdc_field USING 'BSEG-WRBTR' l_amount. "Amount
PERFORM bdc_field USING 'BSEG-PRCTR' ''. "Profit Center
**populate payment advice no. only for electronic transfer
**do not populate depot code for electronic transfer
IF i_blart EQ 'ZE'.
PERFORM bdc_field USING 'RF05A-AVSID' i_pay_advice. "Pmt Adv. no
ELSE.
PERFORM bdc_field USING 'BSEG-ZUONR' i_zuonr. "Depot Code-Assignment
ENDIF.
**open items data
PERFORM bdc_field USING 'RF05A-AGKOA' 'D'. "Acc type (D=customers)
PERFORM bdc_field USING 'RF05A-XNOPS' 'X'. "Std OIs check box
**Document Overview Screen
IF t_open_items[] IS INITIAL. "only when there are no open items
PERFORM bdc_dynpro USING 'SAPMF05A' '0700'. "Overview Screen
PERFORM bdc_field USING 'BDC_OKCODE' '/00'. "OK CODE
PERFORM bdc_field USING 'RF05A-NEWBS' '15'. "Posting Key
PERFORM bdc_field USING 'RF05A-NEWKO' i_kunnr. "customer (GL ACC)
**next screen
PERFORM bdc_dynpro USING 'SAPMF05A' '0301'.
PERFORM bdc_field USING 'BDC_OKCODE' '=BU'. "ok code - save
PERFORM bdc_field USING 'BSEG-WRBTR' l_amount. "amount
PERFORM bdc_field USING 'BSEG-GSBER' i_gsber. "business area
PERFORM bdc_field USING 'BSEG-ZTERM' '0001'. "payment term
ELSE.
**for open items on the main screen
PERFORM bdc_field USING 'RF05A-AGKON' i_kunnr. "Customer
ENDIF.
**clear program variables
CLEAR : l_period,l_amount,t_bdcdata.
ENDFORM. " fill_bdc_data_f-28
this of course stops you at the open items screen from where my processing proceeds according to user action....
does it help...?? I know i will have a tough time if i have to study someone else's code...:-)
rgds,
PJ
Hi PJ
Sorry, it does not help me much. But thank you for the idea.
My situation is im passing my data from VB.Net to SAP using RFC.
I cannot 'double-click' to which Document Number I wanted to knock-off. Well, this is the difficult part in doing the BDC.
Yup, kinda tough time to study people's code. I just need ideas and some sample would do.
Thank you.
Regards.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.