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: 

hi shashank

Former Member
0 Kudos

hi shasank thanks for ur reply , but before using the function module , how to upload the data for parnter functions, i mean to assign the parnter functions in a flat file , first the partner functions need to be created in sap. once we have the partner functions in sap , then we can use the function module that u have mentioned, am i right, kindly advice

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Syed ,

If you dont mind me answering . To upload the text file into SAP you need to use the below function module

The upload_table should be an internal table which contains the fields in the text file.

If the text file is tab separated then you need to set the parameter 'has field separator' to X

filename is the path to where the text file is stored

DATA: lcl_filename TYPE string.

lcl_filename = filename.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = lcl_filename

filetype = 'ASC'

has_field_separator = 'X'

TABLES

data_tab = upload_table

EXCEPTIONS

file_open_error = 1

file_read_error = 2

no_batch = 3

gui_refuse_filetransfer = 4

invalid_type = 5

no_authority = 6

unknown_error = 7

bad_data_format = 8

header_not_allowed = 9

separator_not_allowed = 10

header_too_long = 11

unknown_dp_error = 12

access_denied = 13

dp_out_of_memory = 14

disk_full = 15

dp_timeout = 16

OTHERS = 17.

After you have uploaded the file then you can pass the values from uploaded table to the corresponding parameters in the function module

7 REPLIES 7

Former Member
0 Kudos

Hi Syed ,

If you dont mind me answering . To upload the text file into SAP you need to use the below function module

The upload_table should be an internal table which contains the fields in the text file.

If the text file is tab separated then you need to set the parameter 'has field separator' to X

filename is the path to where the text file is stored

DATA: lcl_filename TYPE string.

lcl_filename = filename.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = lcl_filename

filetype = 'ASC'

has_field_separator = 'X'

TABLES

data_tab = upload_table

EXCEPTIONS

file_open_error = 1

file_read_error = 2

no_batch = 3

gui_refuse_filetransfer = 4

invalid_type = 5

no_authority = 6

unknown_error = 7

bad_data_format = 8

header_not_allowed = 9

separator_not_allowed = 10

header_too_long = 11

unknown_dp_error = 12

access_denied = 13

dp_out_of_memory = 14

disk_full = 15

dp_timeout = 16

OTHERS = 17.

After you have uploaded the file then you can pass the values from uploaded table to the corresponding parameters in the function module

Former Member
0 Kudos

Hi,

Sorry for late..

What do you mean by uploading partner functions in SAP?

they are already there.. like sold-to-party, ship to party etc.

you will have to upload data in KNVP table by the function module which i told u earlier.

You can create a flat file as you would do in case of a BDC and use it.

Hope it helps...

Regards,

Shashank

0 Kudos

shashank ,

see the cusotmer has two ship to party for example. then before assigning this ship to party to particular customer we need to have the data about this ship to party in sap ,is it right.actually we have around thirteen partner functions. i think u got my point.kindly reply

0 Kudos

Hi Syed,

You are correct... This is the usual procedure followed to upload partners for a customer.

YOu need to create all the parnters separately in SAP, then assign those partnters to the Customer in the Partner functions screen of the Customer Master.

I followed the same procedure to upload the partners to a Customer and a Vendor.

Regards,

Vara

0 Kudos

Hi Syed,

You are correct. After all, the partners are also the customers and hence need to be uploaded before assigning them to any customer.

The approach could be

1. Upload all the customers w/o partners.

2. Assign the partner functions to each customer.

Let me know if you have any further querries.

Regards,

Shashank

0 Kudos

Thanks shashank for all ur advice , but don't u think it will be laborious process to upload all the partner functions ,then download it and assisgn to particulat customer and upload it.

I think we need to discuss this issue with SAP.

thanks.

Regards.

Syed

0 Kudos

We are developing new PO format for Release Order ( Contract) where in we want to print the Open order quantity & Open order value along with Contract number.

What is the best logic for Open order quantity, where in it has consider all the previous release order quantities minus the target quantity in contract.

Open order quantity = target quantity in contract - all previously release order quantities.

Thanks in advance.