Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BDC issue

Former Member
0 Likes
1,047

Hi

I am developing interface program using BDC for VA01.

here I am using referce documnet number as already existed order number, once I have give the reference document, I am gettin all the details fo reference document .

and also around 5 records for material.

here I am selecitn all ..this action getting recorded.

But now want to unselect only 2 records.

and delete remaining records.

Please let me know the process of unselecting the 2 records only .

could you send me the recording process.

regards,

vinesh.

Edited by: Siddivinesh jogu on Feb 15, 2010 12:46 PM

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
969

Did you try Bapi's

BAPI_SALESORDER_CREATEFROMDAT1

BAPI_SALESORDER_CREATEFROMDAT2

8 REPLIES 8
Read only

former_member329859
Participant
0 Likes
969

Hi,

Its a clear logical issue, ur having data u just need to select the proper data using loop-endloop and using flag.

use ur best coding logic and get the data

Thanks,

Gaurav

Read only

Former Member
0 Likes
969

Hi

You need to fetch all the entries into internal table and then probably use delete command based on your condition to delete records.

Regards

Gaurav

Read only

Former Member
0 Likes
969

hi,

Through TXN SHDB->New Recording you can do recording of VA01 .....At the time of recording whatever required field that fields are only recorded....if in any field selected corresponding all field in recording & no need in program .........check on the loop condition in recorded code ,just convert it as requirement by removing fields or some logic .

regards

Gaurav

Read only

0 Likes
969

Hi ,

It should be done in BDC only...

I was able upto selecting all through recording..

And need to know what is the code will be used for unselecting.

After that I have command which will delete the records.

regards,

vinesh.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
970

Did you try Bapi's

BAPI_SALESORDER_CREATEFROMDAT1

BAPI_SALESORDER_CREATEFROMDAT2

Read only

Former Member
0 Likes
969

hi,

no code will be used for unselecting only logic is used. ...you can only skip ,for unselecting if fields comes into a screen you have to delete the code of under that screen number written for unnecessary fields .

regards

Gaurav

Read only

Former Member
0 Likes
969

Hi Siidivinesh,

You have to build logic for this. Whlie creating recording for this you have record in such way that select some row and delete it. Then by observing the recording develop logic. You have to use Loop .... Endloop funda.

Read only

Former Member
0 Likes
969

Hi Dear,

There could be two solutions for your probelm.

Doing it with BAPI: From your reference document any number of line items that you get, process your logic in loop....endloop

delete the records(line item in your item table) which you do not want to create...call BAPI for sales order to create it.

Doing it with BDC: here will be a bit tricky...again in loop.endloop you have to check which document you do want to delete and which one you want to keep...if you want to delete first 2 items then always...keep the cursor on (01) for that marked field and keep deleting the record..next remaining record will then become the first line item of your all line items.

If randomly you want to delete the line items in which you are not sure which should be deleted(there may be scenario where you do not know which all materials or line items should be deleted)...then you have to create the logic as the line items are there in table control...keep taking the tabix from loop...endloop...put the cursor for that tabix in your table control (number of the line item to be deleted)...

And then process your "-" button to delete the record....

Regards,

Mahen