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

BAPI -VB11

Former Member
0 Likes
2,126

Hi Gurus,

Can anyone give me a BAPI which corresponds to VB11-Material Replacement ?

I need to update standard database table.

Thanks

Chandan

8 REPLIES 8
Read only

Former Member
0 Likes
1,527

please go thru this all

RV_MAT_SUB_SAVE ( Update for Material Substitution)

see Include :MV13DF00

CALL FUNCTION 'RV_MAT_SUB_SAVE' IN UPDATE TASK

EXPORTING

USE_OUTBOUND_CALL = BOOLE_T

TABLES

X_KONDDVB = XKONDD

Y_KONDDVB = YKONDD

X_KONDDPVB = XKONDDP

Y_KONDDPVB = YKONDDP

DB_TIME = TIME_VAKE_DB

DB_XVAKE = XVAKE.

Also check this if required

PRODUCT_SUBSTITUTION

COND_CROSS_SELLING

Try with Fm RV_MAT_SUB_SAVE

CALL FUNCTION 'RV_MAT_SUB_SAVE' IN UPDATE TASK

EXPORTING

USE_OUTBOUND_CALL = BOOLE_T

TABLES

X_KONDDVB = XKONDD

Y_KONDDVB = YKONDD

X_KONDDPVB = XKONDDP

Y_KONDDPVB = YKONDDP

DB_TIME = TIME_VAKE_DB

DB_XVAKE = XVAKE.

This FM is used in the include MV13DF00

and see

try to commit the DB work by using 'BAPI_TRANSACTION_COMMIT' and see if table has been updated.

Read only

0 Likes
1,527

Thanks Prem, But I need to pass some fields to the FM, where can I pass them ?

I need to pass Two material numbers from my Program to this FM, where can Pass them ???

Thanks

Chandan

Read only

0 Likes
1,527

you can pass the materials to the tables which is in the function module in the loop one by one

CALL FUNCTION 'RV_MAT_SUB_SAVE' IN UPDATE TASK

EXPORTING

USE_OUTBOUND_CALL = BOOLE_T

TABLES

X_KONDDVB = XKONDD

Y_KONDDVB = YKONDD

X_KONDDPVB = XKONDDP

Y_KONDDPVB = YKONDDP

DB_TIME = TIME_VAKE_DB

DB_XVAKE = XVAKE.

Read only

0 Likes
1,527

But where to pass, which is the corresponding field in the FM ???

Can you please elaborate ??

In VB11, you can see there are two type of material numbers, I need to pass those material numbers from my program to the FM, so can u please tell me where in the FM, should I pass my material numbers ?

Thanks

Chandan

Read only

0 Likes
1,527

Can anyone Please help me ???

Read only

0 Likes
1,527

the material you want to substitute is in this field KONDDVB-SMATN, for this you declare an internal table like X_KONDDVB like KONDDVB with field SMATN where the material need to pass

Read only

0 Likes
1,527

Prem,

Do u mean, I need to pass my fields in TABLES part of the FM ??

I guess TABLES is for output purpose ! Also I need to enter two materials and not one, you said only about one !!!

Ca u tell me exactly what I need to do ?

I have two fields with me: Old Matnr and New Matnr.

Old matnr will be replaced by New matnr

Please tel me wat I need to do

Read only

Former Member
0 Likes
1,527

Solved