Multiple Partner Function in a sales Order
Hi
I have created a partner function ZR Referred By ( Type Customer) but not able to enter multiple ZR in a sales Order
Error .VPD012. Partner Function can occur only 1 in ..
The requirement is to attach the referred customers for reporting purpose and there can be more than one customer referring this new Customer / Order.
Hi
Thanks for the input but the solutions suggested by you all does not work.
The Unique button is only relevant for Customer Master and not the Order. In the Order you can have only one.
The Button Modifiable is only for allowing you to change a Partner and not adding another partner with the same partner function.
Any way I figured a way out, we can use the system provided AA ( Partner Function) and able to use multiple AAs in a Service Contract./Scheduling agreements.
But if you need to have multiple partner in a sales Order ...Only way seems to be to have Z1, Z2 Etc ...
Thanks
Similar Messages
-
Creating multiple partner function for a sale order @ header level
Hi All,
I have a requirement where in i have to create more than one partner funtion for a sale order @ header level. But the system did not allow this sort of scenario and i got the error,
Partner function ZZ can only occur 1 times in procedure TA (Sales Document Header)
the function module that was giving this error was SD_PCHECK_PARVW_COUNT_OK
here the function module checks if a partner function already exists if so it throws that error. This also updates the VBPA table where partner function is one of the key fields.
Our issue is that we have to allow the system to enable posting 2 or more partner function for the same sale order. It was also verified that the unique key was unchecked during configuration.
is there any other way of over coming this issue as we are updating the standard table. Is it possible??
Thanks a lot in advance for your reply....I believe this is a configuration setting, based upon the details of your post. Typically, a sales order can have multiple partner functions, but usually the partner type is not duplicated at a single level (header or one item). For example, it would not be logical to have multiple ship-to partners at the header level...these would be unique at the item level, if required.
Speak to your SD functional specialist about the configuration controls for partners, if you must have more than one partner with parvw = ZZ, for the entire order (header level).
Edited by: DaveL on Aug 23, 2011 3:00 PM -
Partner function change in sales order
Hi,
I have partner function ZR (sales employee) defined for customer master. I enter a particular employee no 100 in the customer master. and subsequnetly the partner function ZR gets copied into a contract with value 100.
now another user is trying to change the value to 200 from 100, but the system is giving a message that partner function ZR not defned for partner procedure.
If i go to partner determination for sales order , then i see that there is no partner function ZR assigned for a patner procedure.
my question is that the above is happening due to lack of master data for emploee id 200 from HR module or is it that we have to maitain partner function ZR for sales order (I have seen that ZR is not maintained for sales order. ).Iam assuming that for contracts aslo, the config needs to be done in parnter determination for sales order.
regards
sachinHi Sachin,
I assume that you have configured the partner functions for Customer master including ZR, also enabled ZR for the partner procedure applicable for the sales document type.
If this is done, then the partner function ZR should be available for entry in the sales order.
Now the problem is that
You shoudl have assigned the partner function ZR to some account group, while creating this partner function, and customer 100 shoudl have belonged to this account group.
However the customer 200 whom you want to update as the new ZR doesnt belong to this account group.
You can use only those customers belonging to the account group which is linked to the partner function ZR as sales employees.
So find out the customers belonging to the account group, which is linked to the partner function ZR. Make sure their masterdata is correct for the sales area which you wnat to use. If all the things satisfy, then you should be able to use them as ZR partner in your sales document.
This should solve your problem.
Pls reward if this helps you to solve the problem -
Partner Function Structure in Sales Order
Hi All,
What is the Partner Function Structure in Sales Ordere (Item Level)?
(In which structure the partner functions are displays in sales order item level?)
Thanks in advance.HI Raja,
Thanks for your replay.
I did the same thing what ever u said, but the thing is while doing debugging the values are not showing in that structure. Like header and item data will available in KOMK and KOMP structurs, not in screen field strucuture. I am thinking that there may be some structure for partner functions like KOMP, KOMK.
Thanks -
Multiple Partner Functions for a Sales document Item
Hi,
Can you please advise on modeling scenario for showing multiple partner functions for a given sales document in BI Report ..
Because Key figure values should not be distributed for multiple records just becos of multiple partner functions but users want to see them in the reports along with sales doc and key figure
I am explaining bit more clearly...
I can achieve above requirement by having below model ..
SDOC ITEM PF1 PF2 PF3 AMOUNT
1000 10 AB CD EF 50000
PF : Partner Function
but as I feel it is a complicated task to add more and more columns fro partner functions as and when new partner functions have been added or requested to show by users at sales doc level...
So Can you please advise a better solution to meet the same requirement.
Thanks & Regards,
BRK
Please advise me on this scenario
Thanks & Regards,
BRK
Edited by: BRK on Jul 22, 2008 9:19 AM
Edited by: BRK on Jul 22, 2008 9:29 AMSalesDoc______Item_______PartnerFunction________Amount
80000_________10_____________A1_______________$1000
80000_________10_____________A2_______________$1000
80000_________10_____________A3_______________$1000
This will be the normal display in the cube if there is only one Partner Function.
But what we need is
SalesDoc______Item_______PartnerFunction________Amount
80000_________10_____________A1_______________$1000
80000_________10_____________A2_________________' '
80000_________10_____________A3_________________' '
The Amount (KF) should be populated only for the first record for a SalesDoc / Item combo.
You load data from source to the ODS, say delta.
Suppose that the below record is already available in the ODS.
SalesDoc______Item_______PartnerFunction________Amount
80000_________10_____________A1_______________$1000
And you get the following data as DELTA in the Data_Package from the source.
SalesDoc______Item_______PartnerFunction________Amount
80000_________10_____________A2_______________$1000
80000_________10_____________A3_______________$1000
If you populate the Amount again for these 2 records, then the total would sum to $3000, which is wrong.
So what we do is,
Write a Select stmt for ALL ENTRIES in Data_Package and fetch the records from the target ODS. Have it in an Internal table, say t_ODS1
Take the SalesDoc / Item from the Data_Package and chk if it is present in the internal table t_ODS1.
If it is present, then populate the Amount as ' ' (Blank)
Else populate the Amount as $1000.
Say, you are getting 3 new records, which is not present in the ODS1.
In that case, your internal table t_ODS1 will be blank.
Now again, we need to populate the Amount only for the first record among the 3 records.
So, here comes the "Flag".
Set the Flag as X, when we populate the Amount.
Everytime chk the Flag <> X.
Only if it is <> X, populate the Amount.
Else Leave it Balnk.
Hope I have explained in detail
Regards,
Balaji V -
Regarding finding out Partner function based on Sales Order/Output Type
Hi All,
<b>I have a issue in finding out Partner function[PARVW], Message partner[PARNR], Message transmission medium[NACHA], Teletex number[TELTX], User name[USNAM], Message processed manually[MANUE], Country Key[TLAND] and some other fields all are related to NAST table.</b>
Actually we have one script which is already working when we run from from <b>VA02/03</b> for single order.
When we execute from <b>VA02/03</b> all <b>NAST</b> table entries are filled up and by using those entries we are fetching remaining entries and displaying them in Output.
Now we are developing another program where we will have a selection screen with <b>Sales order, Output Type & Order Type</b> and execute the program and then we will get list of sales orders in <b>ALV list output</b> with check boxes before every record.
Now if we select one (or) multiple records from there and click on Print Prevview button i am calling above <b>SAP Script Print Program</b> but now in that P.Program we will not have any <b>NAST</b> table entries other than Sales Order and Output Type those can be moved to [<b>NAST-OBJKY, NAST-KSCHL</b>].
But here what about other fields in <b>NAST</b> table like <b>PARVW, PARNR, NACHA, TELTX, USNAM, MANUE, TLAND</b> etc.
How can we get them as we are exclusively using those other <b>NAST</b> table entries in above <b>SCRIPT/Print Program</b>.
Can anybody solve this issue!
Thanks in advance.
Thanks & Regards,
Prasad.Check this FM
WFMC_MESSAGES_SELECT
example
tables : nase.
constants: appl like nase-kappl value 'V2'.
select-options:
rg_nacha for nase-nacha default '1',
rg_kschl for nase-kschl.
ranges: rg_objky for nast-objky.
data:
msgs_1 like msg0 occurs 100 with header line.
*-Fill Object Key
*-Execute fm
call function 'WFMC_MESSAGES_SELECT'
exporting
pi_application = appl
pi_processing = '1'
tables
ri_medium = rg_nacha
ri_type = rg_kschl
ri_object = rg_objky
tx_messages = msgs_1. -
More than one "Sales Employee"(Partner Function Value) in sales order.
Hi Experts,
My customer requested add more than one "Sales Employee"
in Sales Item Line. As the standard SAP, I can add only one
"Sales Employee" value in one partner function. Any suggestions?
Thanks,
PrachHi Prach,
You can add one sales employee per line item. In one line item you cannot add morethan one sales employee however.
If you want to include morethan one sales employee to EVERY LINE ITEM, then
1. Create some PFs like Salesperson1, Salesperson2 etc, say upto 5.
2. Now assign this PF to the sales document header and item category,
3. For all the PFs, you can have the same account group.
4. Now you can create customer master for all these sales person.
5. Once this is done, you can link multiple sales persons for each line item.
Hope thsi helps you
Pls reward if thsi helps you -
CRM Table for finding Partner Function for a Sales Order
Hello everyone,
I am trying to retrieve Ship-to-Party Customer Number for a particular Transaction (Sales Order) from a SAP CRM table.
In SAP SD we have a table VBPA for the same.
I would like to retrieve the same either from a single table if available or multiple linked tables in SAP CRM.
I tried to link CRMD_ORDERADM_H & CRDM_PARTNER to retrieve the data .. But it dint work.
I am new to CRM .. so Gurus, please share ur insight.
Thanks
VinHi,
Select GUID_SET in table CRMD_LINK where GUID_HI = CRMD_ORDERAMD_H-GUID.
Use the GUID_SET to select data in table CRMD_PARTNER.
Best regards,
Caíque Escaler -
New z-partner function in the B2B-order
Hi,
We have created new Z-partner function for B2B-sales order.
It's works good in GUI: determination by sold-to, filled in the document. ok.
Now, we want to add this z-patner function to B2B-sales order
How I can do it?
Denis.Hello Denis,
If you are using this partner function for contact person then you need to add this in the shop management.
Logon to the shop management, open the shop , under general information you can see the label user administration under that you can see the option to enter the partner function for contact person.
In all other case if the transaction type of your web order have this partner function assigned, then it will work.
Regards,
Shanto Aloor -
Mail to multiple Partner function
Hi,
We are in process of implementing SOLMAN CHARMS .
i have a requirement where i need to send mail to multiple partner function.
I have created a z action , however it gives option to select only one Partner function.
Is there any way to send mail to multiple Partner function or any workaround for this?
Kindly suggest.
Regards,
Sangvir SinghHello Sangvir,
As stated, you can create multiple actions (if you do that, don't forget to properly tune the action merging). This is the best option, because involves only configuration.
You can also add a few ABAP code in a new implementation of the standard send mail method and add multiple mail destinations in the "To" or "CC" fields. This is simpler than sounds to be. Ask for an ABAPper to analyze the method source code and he/she will adapt it for you in a question of hours.
Best Regards,
C Canzone -
Default Functional Area in Sales Order Line Items
Hi,
Is there any user exit that can be used to default Functional Area in Sales Order Line Items.
I tried mv45afzz but not working. Any idea and do let me know the field or structure effected.
Thanks.Hi Sathish
You can update table XVBAP from program SAPMV45A in program mv45afzz like code below:
FIELD-SYMBOL: <mytab> LIKE STANDRD TABLE OF VBAP.
ASSIGN (SAPMV45A)XVBAP TO <mytab>.
LOOP AT <mytab>.
ENDLOOP.
I hop it helps .
Kind regards
Carlos Machado -
Multiple deliveries from a single sales order
Hi all,
Can any body explain how to Configure the process to create multiple deliveries for one sales order and one invoice for these multiple deliveries.
Thanks and regards,
Dinesh KumarHi,
In customer master in shipping screen of sales area data we have a field for partial deliveries. SAP allows 9 maximum deliveries for a single sales order. The partial deliveries should be allowed otherwise the system will not allow you to create multiple deliveries for the same order.
Create a sales order in VA01, save it. Go to VL01N and as per your requirement change the delivery qty. For example the order qty is 50. For the first time when i go to VL01N, in the delivery qty field i will change it from 50 to say 10, accordingly i will pick 10 pc only and I will do PGI. The next time i go to VL01N the system will show me 40 in delivery qty field. I will change it from 40 to 10 and do the picking & PGI. Similarly i do the same thing 3 more times. Now my sales order qty is 50 and i have 5 deliveries for this sales order.
<b>Creating single invoice:</b>
Go to VF01 and enter all the 5 different delivery numbers there and press enter. Click on execute or press "F8" the system will take you to a screen where it will show you 5 line items of the same material with 10 quantities each. Save the invoice. Thus you created a single invoice for multiple deliveries of a single sales order.
<b>Invoice split:</b>
Suppose when the delivery of the items is being done for different shipping addresses then the SH is different. Now the invoice will split - means after you enter the 5 delivery numbers and press "F8" the system will show you a button for "Split Analysis" If you click on this the system will show you the criteria because of which the split is taking place. The followig are important for invoice split:
1. Ship to party,
2. Incoterms,
3. Billing date,
4. Reference number
Reward points if solution helps.
Regards,
Allabaqsh G. Patil -
Using bsid and bsad I needed get partner name related to sales order
Hi
Using bsid and bsad I needed get partner name related to sales order
I have gone through the tables but its vbeln column is blank
How can I make relation between bsid and bsad with vbak if vbeln and column is blank in the table bsid and bsad.
Please guide me.
Regards
Sebastian
Edited by: Sebastian John on Apr 21, 2009 3:35 PMBSID-VBELN = VBRK-VBELN.
Billing document number is there in BSID table.
Regs. -
Problem in uploading multiple line items while Creating sales order by BAPI
Hi experts , Im able to create sales order with one item while using this program, but the problem is when iam having multiple items or multiple sales order , iam not able to createthe line items , though its creating sales order header , Iam copy pasting my code , please add the additional code to my code to take more than 1 line items ,This is urgent requirement . Points will be rewarded for answers , Thanks in advance
*& Report Z_SO_CREATE_BAPI
REPORT Z_SO_CREATE_BAPI.
DATA: i_header TYPE bapisdhd1 occurs 0 with header line.
DATA: i_details TYPE bapisditm OCCURS 0 WITH HEADER LINE.
DATA: i_partner TYPE bapiparnr OCCURS 0 WITH HEADER LINE.
DATA: i_return1 TYPE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: i_return2 TYPE bapiret2.
data : ORDER_HEADER_IN like BAPISDHD1.
data : ORDER_ITEMS_IN like BAPISDITM occurs 0 with HEADER LINE .
data : ORDER_ITEMS_INX Like BAPISDITMX occurs 0 with HEADER LINE .
data : RETURN like BAPIRET2 occurs 0 with header line.
data : ORDER_PARTNERS like BAPIPARNR occurs 0 with
header line.
DATA : ORDER_KEYS LIKE BAPISDKEY OCCURS 0 WITH HEADER
LiNE.
data : ORDER_SCHEDULES_IN like BAPISCHDL occurs 0 with
header line.
data : ORDER_SCHEDULES_INX like BAPISCHDLX occurs 0 with
header line.
data : BEGIN OF TAB OCCURS 0,
SRNO(4),
DOC_TYPE like ORDER_HEADER_IN-dOC_TYPE,
SALES_ORG LIKE ORDER_HEADER_IN-SALES_ORG,
DISTR_CHAN LIKE ORDER_HEADER_IN-DISTR_CHAN,
DIVISION like ORDER_HEADER_IN-DIVISION,
REQ_DATE_H(10),
PURCH_DATE(10),
PMNTTRMS LIKE ORDER_HEADER_IN-PMNTTRMS,
PURCH_NO_C LIKE ORDER_HEADER_IN-PURCH_NO_C,
ITM_NUMBER like BAPISDITM-ITM_NUMBER,
MATERIAL LIKE ORDER_ITEMS_IN-MATERIAL ,
PLANT LIKE ORDER_ITEMS_IN-PLANT,
TARGET_QTY LIKE ORDER_ITEMS_IN-TARGET_QTY,
ITM_NUMBERX like ORDER_ITEMS_INX-ITM_NUMBER ,
MATERIALX LIKE ORDER_ITEMS_INX-MATERIAL ,
CUST_MAT22 LIKE ORDER_ITEMS_IN-CUST_MAT22,
PLANTX LIKE ORDER_ITEMS_INX-PLANT,
TARGET_QTYX LIKE ORDER_ITEMS_INX-TARGET_QTY,
ITM_NUMBER LIKE ORDER_ITEMS_IN-ITM_NUMBER,
MATERIAL LIKE ORDER_ITEMS_IN-MATERIAL ,
PARTN_ROLE LIKE ORDER_PARTNERS-PARTN_ROLE,
PARTN_NUMB LIKE ORDER_PARTNERS-PARTN_NUMB,
END OF TAB.
DATA: v_vbeln TYPE bapivbeln-vbeln.
selection-screen begin of block b1 with frame.
skip 3.
parameter:p_infile like rlgrap-filename obligatory.
skip 3.
selection-screen end of block b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_infile.
PERFORM value_help.
start-of-selection.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = p_infile
FILETYPE = 'DAT'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
tables
data_tab = tab.
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
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
**Validation for the Create SO screen
*AT SELECTION-SCREEN ON BLOCK na_create.
Loop at Tab.
i_header-doc_type = TAB-DOC_TYPE .
i_header-sales_org = TAB-SALES_ORG.
i_header-distr_chan = TAB-DISTR_CHAN .
i_header-division = TAB-DIVISION .
append i_header.
*endloop.
i_partner-partn_role = TAB-PARTN_ROLE .
i_partner-partn_numb = TAB-PARTN_NUMB.
APPEND i_partner.
i_details-material = TAB-MATERIAL .
APPEND i_details.
endloop.
*Bapi for Creating SO
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
SALESDOCUMENTIN = v_vbeln
order_header_in = i_header
ORDER_HEADER_INX =
SENDER =
BINARY_RELATIONSHIPTYPE =
INT_NUMBER_ASSIGNMENT =
BEHAVE_WHEN_ERROR =
LOGIC_SWITCH =
TESTRUN =
CONVERT = ' '
IMPORTING
SALESDOCUMENT = v_vbeln
tables
RETURN = i_return1
ORDER_ITEMS_IN = i_details
ORDER_ITEMS_INX = ORDER_ITEMS_INX
order_partners = i_partner .
ORDER_SCHEDULES_IN =
ORDER_SCHEDULES_INX =
ORDER_CONDITIONS_IN =
ORDER_CONDITIONS_INX =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
ORDER_CCARD =
ORDER_TEXT =
ORDER_KEYS =
EXTENSIONIN =
PARTNERADDRESSES =
IF NOT v_vbeln IS INITIAL.
*Bapi Commit Work
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
return = i_return2
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'
IMPORTING
RETURN =
ENDIF.
LOOP AT i_return1 . "INTO wa_return1.
WRITE:/ i_return1-message.
ENDLOOP.
FORM value_help .
CALL FUNCTION 'DSVAS_DOC_WS_FILENAME_GET_50'
EXPORTING
DEF_FILENAME = ' '
DEF_PATH = ' '
MASK = ',.,..'
MODE = 'O'
TITLE = ' '
IMPORTING
FILENAME = p_infile
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform.
txt file data
order type salesorg distch divison materialno parter role
TA PB01 01 00 000000000000000852 WE
Partner no
8101000000Hi Neerja,
you can reffer this sample code. It may not be complet soluation for your poblem,
but you will get some idea.
*& Report ZBAPI_SALESORDER_CREATE
*& Author : Karthik
REPORT ZBAPI_SALESORDER_CREATE.
data : ORDER_HEADER_IN like BAPISDHD1.
data : ORDER_ITEMS_IN like BAPISDITM occurs 0 with
header line.
data : RETURN like BAPIRET2 occurs 0 with header line.
data : ORDER_PARTNERS like BAPIPARNR occurs 0 with
header line.
DATA : ORDER_KEYS LIKE BAPISDKEY OCCURS 0 WITH HEADER
LINE.
data : ORDER_SCHEDULES_IN like BAPISCHDL occurs 0 with
header line.
data : BEGIN OF TAB OCCURS 0,
SRNO(4),
DOC_TYPE like ORDER_HEADER_IN-dOC_TYPE,
SALES_ORG LIKE ORDER_HEADER_IN-SALES_ORG,
DISTR_CHAN LIKE ORDER_HEADER_IN-DISTR_CHAN,
DIVISION like ORDER_HEADER_IN-DIVISION,
REQ_DATE_H(10),
PURCH_DATE(10),
PMNTTRMS LIKE ORDER_HEADER_IN-PMNTTRMS,
PURCH_NO_C LIKE ORDER_HEADER_IN-PURCH_NO_C,
ITM_NUMBER like BAPISDITM-ITM_NUMBER,
CUST_MAT22 LIKE ORDER_ITEMS_IN-CUST_MAT22,
PLANT LIKE ORDER_ITEMS_IN-PLANT,
TARGET_QTY LIKE ORDER_ITEMS_IN-TARGET_QTY,
PARTN_ROLE LIKE ORDER_PARTNERS-PARTN_ROLE,
PARTN_NUMB LIKE ORDER_PARTNERS-PARTN_NUMB,
END OF TAB.
data: itab1 like alsmex_tabline occurs 0 with header
line.
DATA: gd_currentrow type i.
data : PURCHASEORDER like ekko-ebeln.
Data: tot_rec type i, "Total Records
gd_update type i, "Main Table Increement Counter
gd_lines type i, "Success Table increement Counter
w_textout like t100-text. "VARIABLE TO GET ERRORLOG
data : begin of it_success occurs 0,
SALESDOCUMENT LIKE BAPIVBELN-VBELN, "PROJECT
end of it_success.
data : begin of it_error occurs 0,
srno(4),
err_msg(73) TYPE c, "TO RETREIVE ERROR MESSAGES
end of it_error.
data : srno(4).
DATA : SALESDOCUMENT LIKE BAPIVBELN-VBELN.
selection-screen begin of block b1 with frame.
skip 3.
parameter:p_infile like rlgrap-filename obligatory.
skip 3.
selection-screen end of block b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_infile.
PERFORM value_help.
start-of-selection.
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_infile
i_begin_col = '1'
i_begin_row = '2' "Do not require
headings
i_end_col = '22'
i_end_row = '10000'
TABLES
intern = itab1
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
others = 3.
if sy-subrc <> 0.
message e010(zz) with text-001. "Problem uploading
Excel Spreadsheet
endif.
*perform open_group.
sort itab1 by row col.
Get first row retrieved
read table itab1 index 1.
Set first row retrieved to current row
gd_currentrow = itab1-row.
loop at itab1.
Reset values for next row
if itab1-row ne gd_currentrow.
append tab .
clear tab.
gd_currentrow = itab1-row.
endif.
SHIFT ITAB1-VALUE LEFT DELETING LEADING SPACE.
case itab1-col.
when '0001'.
TAB-SRNO = itab1-value.
when '0002'.
TAB-DOC_TYPE = itab1-value.
when '0003'.
TAB-SALES_ORG = itab1-value.
when '0004'.
TAB-DISTR_CHAN = itab1-value.
when '0005'.
TAB-DIVISION = itab1-value.
when '0006'.
TAB-REQ_DATE_H = itab1-value.
when '0006'.
TAB-PURCH_DATE = itab1-value.
when '0007'.
TAB-PMNTTRMS = itab1-value.
when '0008'.
TAB-PURCH_NO_C = itab1-value.
when '0009'.
TAB-ITM_NUMBER = itab1-value.
when '0010'.
TAB-CUST_MAT22 = itab1-value.
when '0011'.
TAB-PLANT = itab1-value.
when '0012'.
TAB-TARGET_QTY = itab1-value.
when '0013'.
TAB-PARTN_ROLE = itab1-value.
when '0014'.
TAB-PARTN_NUMB = itab1-value.
endcase.
endloop.
append tab.
clear tab.
sort tab by SRNO.
LOOP AT TAB.
concatenate tab-REQ_DATE_H+4(4)
tab-REQ_DATE_H2(2) tab-REQ_DATE_H0(2) into
tab-REQ_DATE_H.
concatenate tab-PURCH_DATE+4(4)
tab-PURCH_DATE2(2) tab-PURCH_DATE0(2) into
tab-PURCH_DATE.
SRNO = TAB-SRNO.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = tab-PARTN_NUMB
IMPORTING
OUTPUT = tab-PARTN_NUMB.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = tab-CUST_MAT22
IMPORTING
OUTPUT = tab-CUST_MAT22.
IF TAB-SRNO = SRNO.
ORDER_HEADER_IN-DOC_TYPE = TAB-DOC_TYPE.
ORDER_HEADER_IN-SALES_ORG = TAB-SALES_ORG.
ORDER_HEADER_IN-DISTR_CHAN = TAB-DISTR_CHAN.
ORDER_HEADER_IN-REQ_DATE_H = TAB-REQ_DATE_H.
ORDER_HEADER_IN-PURCH_DATE = TAB-PURCH_DATE.
ORDER_HEADER_IN-PMNTTRMS = TAB-PMNTTRMS.
ORDER_HEADER_IN-PURCH_NO_C = TAB-PURCH_NO_C.
ORDER_HEADER_IN-DIVISION = tab-DIVISION.
ORDER_ITEMS_IN-ITM_NUMBER = tab-ITM_NUMBER.
ORDER_ITEMS_IN-material = TAB-CUST_MAT22.
ORDER_ITEMS_IN-PLANT = TAB-PLANT.
APPEND ORDER_ITEMS_IN.
ORDER_PARTNERS-PARTN_ROLE = TAB-PARTN_ROLE.
ORDER_PARTNERS-PARTN_NUMB = TAB-PARTN_NUMB.
APPEND ORDER_PARTNERS.
ORDER_SCHEDULES_IN-ITM_NUMBER = tab-ITM_NUMBER.
ORDER_SCHEDULES_IN-REQ_QTY = tab-TARGET_QTY.
append ORDER_SCHEDULES_IN.
ENDIF.
AT END OF SRNO.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
SALESDOCUMENTIN =
ORDER_HEADER_IN = ORDER_HEADER_IN
ORDER_HEADER_INX =
SENDER =
BINARY_RELATIONSHIPTYPE =
INT_NUMBER_ASSIGNMENT =
BEHAVE_WHEN_ERROR =
LOGIC_SWITCH =
TESTRUN =
CONVERT = ' '
IMPORTING
SALESDOCUMENT = SALESDOCUMENT
TABLES
RETURN = RETURN
ORDER_ITEMS_IN = ORDER_ITEMS_IN
ORDER_ITEMS_INX =
ORDER_PARTNERS = ORDER_PARTNERS
ORDER_SCHEDULES_IN = ORDER_SCHEDULES_IN
ORDER_SCHEDULES_INX =
ORDER_CONDITIONS_IN =
ORDER_CONDITIONS_INX =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
ORDER_CCARD =
ORDER_TEXT =
ORDER_KEYS = ORDER_KEYS
EXTENSIONIN =
PARTNERADDRESSES =
IF SALESDOCUMENT <> SPACE.
commit work.
ADD 1 TO gd_update.
it_success-SALESDOCUMENT = SALESDOCUMENT.
append it_success.
CLEAR :SALESDOCUMENT,ORDER_HEADER_IN.
REFRESH : RETURN,ORDER_ITEMS_IN,ORDER_PARTNERS.
ELSE.
loop at return.
it_error-SRNO = tab-SRNO.
it_error-err_msg = return-MESSAGE .
Append it_error.
ENDLOOP.
CLEAR :SALESDOCUMENT,ORDER_HEADER_IN.
REFRESH : RETURN,ORDER_ITEMS_IN,ORDER_PARTNERS.
ENDIF.
endat.
endloop.
DESCRIBE TABLE it_success LINES gd_lines.
IF gd_lines GT 0.
Display result report column headings
PERFORM display_column_headings.
Display result report
PERFORM DISPLAY_SUCESS.
ENDIF.
IF SUCESS FAILS Display Error Report
DESCRIBE TABLE it_error LINES gd_lines.
IF gd_lines GT 0.
PERFORM errorheadings.
PERFORM errorreport.
ENDIF.
*& Form display_column_headings
text
FORM display_column_headings.
WRITE:2 ' Success Report '(014) COLOR COL_POSITIVE.
SKIP.
WRITE:2 'The following records inserted
successfully:'(013).
WRITE:/ sy-uline(15).
FORMAT COLOR COL_HEADING.
WRITE:/ sy-vline,
(10) 'Sales order'(004), sy-vline.
WRITE:/ sy-uline(15).
ENDFORM. "display_column_headings
*Subroutine to display SUCESS REPORT
FORM DISPLAY_SUCESS.
FORMAT COLOR COL_NORMAL.
LOOP AT it_success.
WRITE:/ sy-vline,
(10) it_success-SALESDOCUMENT, sy-vline.
CLEAR it_success.
ENDLOOP.
WRITE:/ sy-uline(15).
REFRESH: it_success.
FORMAT COLOR COL_BACKGROUND.
ENDFORM. "
DISPLAY_REPORT
*& Form errorreport
text
FORM errorreport.
LOOP AT it_error.
WRITE:/ sy-vline,
(10) it_error-SRNO, sy-vline,
(40) it_error-err_msg, sy-vline.
ENDLOOP.
WRITE:/ sy-uline(104).
REFRESH: it_error.
endform. "errorreport
*& Form ERRORHEADINGS
text
FORM ERRORHEADINGS.
SKIP.
WRITE:2 ' Error Report '(007) COLOR COL_NEGATIVE.
SKIP.
WRITE:2 'The following records failed during
update:'(008).
WRITE:/ sy-uline(104).
FORMAT COLOR COL_HEADING.
WRITE:/ sy-vline,
(10) 'ERROR.'(009), sy-vline.
WRITE:/ sy-uline(104).
FORMAT COLOR COL_NORMAL.
ENDFORM. "ERRORHEADINGS
**& Form value_help
text
--> p1 text
<-- p2 text
FORM value_help .
CALL FUNCTION 'DSVAS_DOC_WS_FILENAME_GET_50'
EXPORTING
DEF_FILENAME = ' '
DEF_PATH = ' '
MASK = ',.,..'
MODE = 'O'
TITLE = ' '
IMPORTING
FILENAME = p_infile
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform. "value_help
Regards,
Amit. -
Partner Determination Problem in Sale Order..
Dear Gurus,
Sold-to Party : 6
Shipt-to Party : 7,8
When creating a sales order when I go for selecting a ship to party , in my case the Sold-to party has multiple ship to parties, then the system gives me this message
Top node 6 for ship to 7 not maintained / ship to is not
valid
Message no. 8W 321
Diagnosis
The top node check is activated in Customizing.
Note:
SP is created by using the account group : 0001
SH is created by using the account group : 0002
I couldn't be able to find where i made a mistake.
Thanks & Regards,
Venkatesh.S.P.Dear Venkatesh,
Please go to Partner determination in the IMG >Sales and Distribution>Basic functions then go to Set Up Partner Determination for Customer here again you select your partner determination procedure then click on partner functions in procedure now system will Change view of the "Partner functions in procedure " screen here you remove the check in the Not modifiable check box for the Ship to party,Bill to party and payer partner functions.
Not modifiable check mark keep only for SP partner function.
Do the same process at all levels
Set Up Partner Determination for Sales Document
Set Up Partner Determination for Sales Document
Set Up Partner Determination for Delivery
Set Up Partner Determination for Billing Header
Set Up Partner Determination for Billing Item
I hope this will help you,
Regards,
Murali.
Maybe you are looking for
-
Full start up disk but 100GB free??
Hi guys I just received my new blackbook and I am loving it. I transferred all my files over from my iMac and cleaned the iMac up so my family can use it as their main computer. The iMac is running Tiger and the blackbook Leopard. Both have 250GB har
-
X79-GD45(8D) with multiple raid0 arrays
Hello everyone, I would like to upgrade my computer soon and I was checking different motherboards for an i7-3930K processor. The X79-GD45(8D) seems pretty good for such a low price motherboard for this socket. However I intend to have 2 different ra
-
I regularly sync my iphone with my powerbook g4 (osx 10.4.11) and I choose always to sync the address book too. However now I cannot get the new conctacts fron my addressbook neither the other way round. So if I add a contact on my iphone I cannot ha
-
I want to create a folder within my mail folders that are already there. Can I create a folder and give it a name like "work" so I can move related messages to that folder?
-
Cache returns an Object of type ImmutableArrayList .
Hi. I've a class that extends HashSet and I put it in the cache. When I retrieve it, I get an object of type ImmutableArrayList. Any idea why or what's going on? cheers