Application Development 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: 

Function Module Query

Former Member
0 Kudos

Points Guarnteed.................

Hi Gurus,

Please explain the below things

1) Please explain the below FMs

a) CALL FUNCTION 'SD_PARTNER_GET_SOURCE_PARTNER'

EXPORTING

I_KUNNR = US_WE

I_PARVW = 'WE'

I_PARVW_SOURCE = 'AG'

I_VKORG = US_VKORG

I_VTWEG = US_VTWEG

I_SPART = US_SPART

I_CALL_BAPI = CALL_BAPI

IMPORTING

E_KUNNR = US_AG

EXCEPTIONS

NO_PARTNER_FOUND = 1

NO_PARTNER_SELECTED = 2

OTHERS = 3.

b) CALL FUNCTION 'SD_SALES_DOCU_MAINTAIN'

EXPORTING

I_VBAKKOM = I_VBAKKOM

I_VBAKKOMX = I_VBAKKOMX

SIMULATION = CHARX

I_VBAKKOM_REF = I_VBAKKOM_REF

I_CALL_BAPI = CHARX

i_without_init = charx

suppress_availibility_dia = space

TABLES

RETURN = DA_RETURN

IX_VBAPKOM = IX_VBAPKOM

IX_VBAPKOMX = IX_VBAPKOMX

IX_VBPAKOM = IX_VBPAKOM

ix_bapiaddr1 = partneraddresses

IX_VBEPKOM = IX_VBEPKOM

IX_VBEPKOMX = IX_VBEPKOMX

IX_KONVKOM = IX_KONVKOM

IX_KONVKOMX = IX_KONVKOMX

IX_KOMFKZM = IX_KOMFKZM

SALES_CFGS_REF = SALES_CFGS_REF

SALES_CFGS_INST = SALES_CFGS_INST

SALES_CFGS_PART_OF = SALES_CFGS_PART_OF

SALES_CFGS_VALUE = SALES_CFGS_VALUE

SALES_CFGS_BLOB = SALES_CFGS_BLOB.

Thanks!!

Aryan

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

Hi,

1. this fm takes the Ship to party Kunnr,sales org,distibution channel and get the Sold to Party Kunnr.

this is used basically to read the partner data.

2.to maintain the Sales Document.

here in your case you are maintiaining the Sales Document passing the Sales Document Header data, etc.. .

Regards

vijay

9 REPLIES 9

Former Member
0 Kudos

Hi,

1. Gets the partner of type WE for a given customer for partner type AG, for a give sales org and other parameters

2. You can change a sales document using this.

Regards,

Ravi

0 Kudos

Hi ,

Points Guarenteed ............... Revert back please

Actually the issue is there is a field called

schdule-line number (VBEP-ETENR) its getting populated as

4001 instead of 1, now this happens only for Internet sales orders (CRM) .. now I need to investigate why is this happening.

Please Read this for detail

"All Bulk ISS orders are showing up in the OTD BW reports as unreported even though they have been reported shipped. The issue appears to be, that for ISS orders only, the schedule line item number for the base bulk line, shows up as "4001" and not "1" as it typically does. "

Rgds,

Aryan

0 Kudos

Have you checked the OSS notes? There are a number of notes related to this field in CRM.

Rob

Former Member
0 Kudos

Since FM SD_SALES_DOCU_MAINTAIN is not released for customer use and has no documentation, I wouldn't use it. Instead, try BAPI_SALESORDER_CHANGE or BAPI_SALESDOCUMENT_CHANGE.

Rob

0 Kudos

Hi Rob,

Do I need to check for OSS notes in CRM or in R/3 ??

and according to you is this FM "SD_SALES_DOCU_MAINTAIN "

used for sales order creation in R/3 ??

Please revert back ..

Rgds,

Aryan.

0 Kudos

Aryan,

Rob is referring to R/3.You need to check for an OSS note here.Meanwhile just to ensure ,use BAPI_SALESORDER_CHANGE and try to change the schedule line value .If it's still getting populated with 4001 look for the OSS note.

Dont forget to use BAPI_TRANSACTION_COMMIT after using BAPI_SALESORDER_CHANGE.

Cheers

Nishanth

0 Kudos

Hi ,

I cannot use BAPI_SALESORDER_CHANGE as the code is all set. I've to find the root cause as to why it is picking wrong Schdule line number

Rgds,

Aryan.

0 Kudos

What I did was to enter:

SD_SALES_DOCU_MAINTAIN crm schedule

on the selection screen. It came back with 17 notes. It would probably be best if you did the same to see if anything fits your particular problem.

Rob

former_member188685
Active Contributor
0 Kudos

Hi,

1. this fm takes the Ship to party Kunnr,sales org,distibution channel and get the Sold to Party Kunnr.

this is used basically to read the partner data.

2.to maintain the Sales Document.

here in your case you are maintiaining the Sales Document passing the Sales Document Header data, etc.. .

Regards

vijay