‎2009 Aug 19 8:02 AM
Hi,
I am doing a bdc program on t.code MIR4 (Display invoice screen).The problem is this screen has a SGA/GPA set so that whenever you into this transaction the last entered value is shown in the first screen.
While doing BDC i deleted the old invoice content (on the first screen) and entered my new invoice number and did the recording.
Now when I run my call transaction using this BDC table the process get stopped in the first screen itself and the old value (set by SGA/GPA) is not removed and hence my bdctab value is not populated and it is showing a error "field 000 not present is program SAPMIR4"
PS : after that i checked my recording and saw that the place where I am clearing the old value on the first screen and entering my new value, nothing is recorded in place of BDC_OKCODE, only bdc_fnam and fval have my new entered value. Maybe it is because the clearing of data is not recorded by my recording...But to record that as there is no okcode for that?
Please advise how to proceed?
‎2009 Aug 19 8:14 AM
Hi,
Before the PERFORM bdc_dynpro USING 'SAPxxxx' '0xx' statement,
use
clear : BDCDATA.
refresh : BDCDATA.
Regards,
Vik
‎2009 Aug 19 10:18 AM
HI
Before the call transaction statement,
try the below statement
SET PARAMETER ID: 'RBN' FIELD XXXXX
Where XXXX is your Invoice Number variable
Regards
Madhan D
‎2009 Aug 19 10:27 AM
Hi Priya,
You need not to delete the previous value.
Don't do recording for deleting previous value simply start recording by assinging value in the input field.
e.g
on initial screen
BDC_FNAME = field_name
BDC-FVAL = new_field_value
.......
It will work.
Regards,
Raj Gupta
‎2009 Aug 19 12:15 PM
Hi priyasingh ,
just go through the following Code .
There is no problem in the flow .You just need th eclear the data in the internal table BDC_DATA so that there are no prevoius values .
form BDC_FIELD using FNAM FVAL.
IF FVAL <> ''.
CLEAR BDC_DATA.
BDC_DATA-FNAM = FNAM.
BDC_DATA-FVAL = FVAL.
APPEND BDC_DATA.
ENDIF.
endform.
and
form BDC_DYNPRO using PROGRAM DYNPRO.
CLEAR BDC_DATA.
BDC_DATA-PROGRAM = PROGRAM.
BDC_DATA-DYNPRO = DYNPRO.
BDC_DATA-DYNBEGIN = 'X'.
APPEND BDC_dATA.
endform.
Hope this may help you .
Thanks and regards
Aditi Wason