on 07-06-2011 8:13 AM
Hi,
I have a field in my application called fixed fee. When i create the matter, the fixed fee amount is getting reflected in transaction va03 when the draft bill is created but when i change the matter and then i change this fixed fee field, the value of this field when creating the matter is only reflected in va03 instead of new value.
I Wrote the following code for this..
FORM CHANGE_MATTER USING P_PS_BILL_FBAMT
p_matcg
p_pwhie
P_PT_CHNG TYPE /tcsls/bchng_field
CHANGING P_LV_FLAG
lt_cond TYPE bapicond
lt_cond_inx TYPE bapicondinx
DATA ls_cond TYPE bapicond.
DATA ls_cond_inx TYPE bapicondx.
DATA lv_kappl TYPE kappl.
DATA lv_koaid TYPE koaid.
DATA lv_cond_type TYPE kschl.
*
*
SELECT SINGLE a~kschl
INTO lv_cond_type
FROM tconuse AS a JOIN /tcsls/tp011 AS b ON bauart = aauart
WHERE b~matcg = p_matcg
AND a~conuse = '51'.
*
CHECK lv_cond_type IS NOT INITIAL.
*
SELECT SINGLE kappl koaid
FROM t685a
INTO (lv_kappl, lv_koaid)
WHERE kschl = lv_cond_type.
*
ls_cond-itm_number = '000000'.
ls_cond-calctypcon = 'B'.
ls_cond-condcntrl = 'C' .
ls_cond-condorigin = 'C' .
ls_cond-cond_type = lv_cond_type.
ls_cond-cond_value = P_PS_BILL_FBAMT.
ls_cond-currency = p_pwhie.
ls_cond-applicatio = lv_kappl .
ls_cond-condclass = lv_koaid .
APPEND ls_cond TO p_lt_cond .
CLEAR ls_cond.
ls_cond_inx-itm_number = '000000'.
ls_cond_inx-cond_type = 'X' .
ls_cond_inx-cond_value = 'X' .
ls_cond_inx-updateflag = 'U' .
ls_cond_inx-currency = 'X'.
APPEND ls_cond_inx TO p_lt_cond_inx.
CLEAR ls_cond_inx.
READ TABLE p_pt_chng TRANSPORTING NO FIELDS WITH KEY field_nam = '/TCSLS/BAPI_PBIL_WS-FBAMT'.
IF SY-SUBRC = 0.
p_lv_flag = 'X'.
ENDIF.
endform.
then i am calling BAPI
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = pvbeln
order_header_in = sheader_in
order_header_inx = sheader_inx
TABLES
partnerchanges = tpartner
order_item_in = titems_in
order_item_inx = titems_inx
conditions_in = tcond_in
conditions_inx = tcond_inx
return = lt_return.
I fail to see how this question is related to Web Dynpro ABAP. This forum is for Web Dynpro ABAP related questions only.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.