2007 May 09 9:56 AM
Hi,
I am writing BDC for XD01 and XK01.
In XK01, OK-Code '=NP' is working fine for getting the new line in a table control.
But in XD01,
In one of the tab name Contact Person, I need to enter variable number of entries in table control (less than 13, in any case), Ok-Code = 'NP' is not working here.
It does not save all the lines.It saves first line and the starts over-writting the second line.In this way, only first and last lines are saved.
LOOP AT i_item WHERE number = i_head-number.
linecount = linecount + 1.
IF linecount = 1.
perform bdc_dynpro using 'SAPMF02D' '0360'.
perform bdc_field using 'BDC_CURSOR'
'KNVK-PAFKT(01)'.
perform bdc_field using 'KNVK-NAMEV(01)'
i_item-NAMEV.
perform bdc_field using 'KNVK-NAME1(01)'
i_item-NAME5.
perform bdc_field using 'KNVK-ABTNR(01)'
i_item-ABTNR.
perform bdc_field using 'KNVK-PAFKT(01)'
i_item-PAFKT.
else.
perform bdc_dynpro using 'SAPMF02D' '0360'.
perform bdc_field using 'BDC_CURSOR'
'KNVK-PAFKT(02)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=NP'.
perform bdc_field using 'KNVK-NAMEV(02)'
i_item-NAMEV.
perform bdc_field using 'KNVK-NAME1(02)'
i_item-NAME5.
perform bdc_field using 'KNVK-ABTNR(02)'
i_item-ABTNR.
perform bdc_field using 'KNVK-PAFKT(02)'
i_item-PAFKT.
endif.
AT END OF number.
perform bdc_dynpro using 'SAPMF02D' '0360'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
Can anyone tell me, what can be the reason for it.
Regards,
Priyanka.
2007 May 10 8:31 AM
Hi,
I am writing BDC for XD01 and XK01.
In XK01, OK-Code '=NP' is working fine for getting the new line in a table control.
But in XD01,
In one of the tab name Contact Person, I need to enter variable number of entries in table control (less than 13, in any case), Ok-Code = 'NP' is not working here.
It does not save all the lines.It saves first line and the starts over-writting the second line.In this way, only first and last lines are saved.
LOOP AT i_item WHERE number = i_head-number.
linecount = linecount + 1.
IF linecount = 1.
perform bdc_dynpro using 'SAPMF02D' '0360'.
perform bdc_field using 'BDC_CURSOR'
'KNVK-PAFKT(01)'.
perform bdc_field using 'KNVK-NAMEV(01)'
i_item-NAMEV.
perform bdc_field using 'KNVK-NAME1(01)'
i_item-NAME5.
perform bdc_field using 'KNVK-ABTNR(01)'
i_item-ABTNR.
perform bdc_field using 'KNVK-PAFKT(01)'
i_item-PAFKT.
else.
perform bdc_dynpro using 'SAPMF02D' '0360'.
perform bdc_field using 'BDC_CURSOR'
'KNVK-PAFKT(02)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=NP'.
perform bdc_field using 'KNVK-NAMEV(02)'
i_item-NAMEV.
perform bdc_field using 'KNVK-NAME1(02)'
i_item-NAME5.
perform bdc_field using 'KNVK-ABTNR(02)'
i_item-ABTNR.
perform bdc_field using 'KNVK-PAFKT(02)'
i_item-PAFKT.
endif.
AT END OF number.
perform bdc_dynpro using 'SAPMF02D' '0360'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
Can anyone tell me, what can be the reason for it.
Regards,
Priyanka.
2007 May 10 8:31 AM
2007 May 10 1:45 PM
Hi,
It worked.
Thanks a lot for your help.
Regards,
Priyanka.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |