PO item text is copied to the Financial Document line item text
A user have requested that the PO item text is copied to the Financial
document line item text, to aid them in analysis of the GR/IR account.
is there any solution to implement this ?
There is no standard setting for this requirement. Check with your ABAP team for this.
Similar Messages
-
Document line item text in Clearing document
Dear All,
Document line item text
My client want the vendor invoice line item text(BSIK-SGTXT) to be captured in the corresponding clearing document line item text field(BSAK-SGTXT).
(i.e) The vendor invoice and its payment clearing document should have the same text in the document line item text filed.
According to me i can use a substition rule and a user exit to assign the values. but here comes a problem* i have one clearing document against 3 to 4 vendor invoice documents* so my programming logic has got stucked here? like which vendor invoice line item text the clearing document should pick up?
is there any other enhancements possible or can some one help me with the programming logic to be applied here.
Thank you
Regards,
Vasanth Dlike which vendor invoice line item text the clearing document should pick up?
is there any other enhancements possible or can some one help me with the programming logic to be applied here
Why don't you discuss the issue with your client? As you said, if you pay 5 invoices in a single run, the payment document item text can't carry all of those texts unless you use the long text. What is the reason for the requirement? Perhaps there's another solution. -
Copying text from CMIR (KNMT) to the Sales Order Line Item
We need to copy text from the CMIR (KNMT) to the Sales Order Line Item with two steps in the access sequence. First to look up by the Ship to Partner Function. If doesn't exist, then look up by Sold to Partner Function. Have setup a new text id (ZPRN), a new access seq (9011). The access seq has one seq =5 for KNMT, ZPRN, all languages and that saves fine. When I set the Partner Function to be SH. I get the following error msg:
"The Language does not come from the partner function AG for MVKE".
Any ideas? This access seq does not reference MVKE. It only references KNMT.
Thanks!Hi Lisa,
Just stumbled on this post, as I am searching for something similar.
What you are attempting to do isn't possible in config.
This is because as standard Customer Material Info Records are not even considered for ship-to party in the sales order.
They work for sold-to only.
Therefore, this funny error message is SAP's way of saying, "Why are you trying to enter a partner here, because the data is determined for sold to only?"
You can change this with development for other fields (ie, to determine delivery plant, tolerances etc at ship-to) by using
the exit MV45AFZB with the USEREXIT_CUST_MATERIAL_READ form.
However, even if you do this, Text Determination is still sold-to only and still doesn't behave.
I am currently looking myself for a solution for this problem and I will let you know what I find.
Cheers
Chris -
PR Short text getting copied to the Item text
Hi All,
I have a scenario in which i need the PR short text getting copied to the Item text while creating a PR. Please let me know if there are any settings for the same.
Thanks,PR short text you mean line item short text field beside material is getting copied?, in such cases make sure that Item text copying rule. from where its getting copied from SPRO>Material Management> purchasing>PR>Texts for Purchase Requisitions >Define Copying Rules.
regards,
qsm sap -
Some items were not copied to the iphone because they cannot be played on this iPhone
Hi Team,
I am using IPhone 2G Model: A1203. While iam transfering Videos(mp4 format) from itunes to iphone it shows this Error "Some items were not copied to the iphone because they cannot be played on this iPhone". Itunes is 11 version Please help me to get rid of this error.
Thanks in AdvanceHey Ratnakar Reddy,
Thanks for the question. I understand that you are experiencing issues syncing your iPhone with iTunes. The following resource outlines the exact error message you are receiving:
iTunes: Videos may be unable to sync to iPhone, iPad, or iPod
http://support.apple.com/kb/TS1497
Thanks,
Matt M. -
Item 000002 is not copied from the reference document
Dear All,
I am facing a typical problem while creating Price difference sales order w.r.t. invoice.
Document types in the system are -
Z2FC - Normal Sales order type, ZPD - Price change order type, Z2FB - Normal invoice type
My item category determination is -
Doc. type - Itm cat. gp. - Usage - Hghr itm cat - Default itm cat. - Manual itm. cat.
ZPD - NORM - blank - blank - G2N - L2N
ZPD - NORM - blank - G2N - G2N - L2N
Z2FC - NORM - blank - Blank - TAN - TAP
Z2FC - NORM - blank - TAN - TANN - TAN
Copy control is -
Z2FB to ZPD for item category TAN with proposed item categories are G2N and L2N.
Z2FB to ZPD for item category TANN u2013 requirement 302 [Do not copy item]
During my Z2FC sales order creation I was having line items as follows
Item no. - Mat. code - Qty - Higher level item - Item category - Amount
10 - 101329 - 3 - blank - TAN - 35,000.00
20 - MC091234 - 3 - 10 - TANN - 0
30 - MC091234 - 1 - 10 - TAN - 5000
We are not using the sales BOM. I need to provide line 20 free to the customer. Hence I have manually maintained 10 in the higher level item column for the line item 20. The item category determined was TAN. Then I had changed it to TANN manually. So the amount became zero. Line 20 became the child and line 10 became parent.
At the same time customer also wishes to buy the material code MC091234. Now the material code MC091234 is of HALB type where as the material code 101329 is of FERT type. There is validation in the system that only FERT type of material could be sold and HALB type of material could be supplied as free. [With item category TANN]. In case HALB type material is also required to be sold then I need to manually maintained value in the higher level item. So I had maintained the value 10 in the higher level item column for the line item 30. The default item category determined is TAN. The invoice is also created properly. [Z2FB type]
But when I am creating the invoice correction document type ZPD w.r.t. Z2FB type invoice, I am able to get the two line items for the material code 101329 in line item 10. One each for G2N and L2N item category.
But for the material code MC091234 in line item 30, I get only one line item with item category G2N. I did not get another line item for the material code MC091234 for the corresponding L2N type item category
At the same time following messages are displayed
Message no. V1475 Item category for item 000002 cannot be determined and
Message no. V1476 Item 000002 is not copied from the reference document
Please help.
Thanks in advance
Piyush RanpuraDear All,
Any help???
Yet my issue is unresolved.
Thanks & Regards
Piyush Ranpura -
Bapi to copy the PO line item below the existing PO line item
Hi All,
I am new to work on BAPI, Can any one help me out,
Requirement is to copy the PO line item below the existing PO line item (Replicate the line item for returns purpose) . So is there any bapi to do this task.
Thanks in Advance
Pallavi
Moderator Message: Please employ the SAP procedures to identify the right BADIs and Exits and help yourself.
Edited by: kishan P on Nov 16, 2010 1:56 PMHi,
What i think is you should use two BAPI one is BAPI_PO_GET_DETAIL to fetch existing details of line items and then BAPI_PO_CHANGE to create s second one.
Nabheet -
Replicate the Sales order Line Item Text to Production Order
I want to replicate the Sales Order Line Item Text to Production Order? Please tell me if this is Functional job or a Developers Job?
I believe this can be achieved by customization and doesnot need any programming and I am trying hard to gather relevant posts for this, but didnt find any.
Please help me with some information if some body encountered this earlier.
Regards,
Jessica Sam.Hey Jay, thanks for your reply.
Please confirm me if this is a developers job or a functional job?
Do i need to do some programming to achive this?
I checked with couple of my collegues and friends and 90% people say it can be achieved throug functional configuration.
can thorugh some light on this as i had been researching on this seriously and still have mixed opinions .
Thanks,
Jessica -
Tcode FV50: How to find long text in FI Document line item Before Saving.
Hi,
How to find long text in FI Document line item.
During Parking of the FI document through Tcode FV50 i m giving the some text in the long text not in the text field.
I would like to validate the Long Text Before Saving in user exit "U300" under the "Sunstitution" .
Please anybody can be help me out where exactly this long text is going to be stored or in which internal table or memory id.
Please give me the answer as soon as possible .
Note:- Read_Text function module is not useful. Because Read_text useful after saving document.Hi Amit,
In application area FINANCIAL ACCOUNTING , go for node LINE ITEM. Here create a step & maintain the prerequisite as per your requirement & in the check you can mention the code or you can direct it to a custom program like ZFI_RGGBR000.
Here while maintaining the check you will get structures BKPF & BSEG in which you will get the desired field you are looking for.
Just try to explore in your system how the other validations are maintained.
After you are done with all your code, you have to run the regeneration program RGUGBR00.
Here utmost care should be taken while running regeneration program, you should select all the checkboxes in the selection screen except GENERATE SETS, GEN SUBSTN ROUTNS IN ALL CLNTS & TRACE PROG. GENERATE CALLS .
Hope this make your doubt clear.
Regards
Abhii -
'BAPI_SALESORDER_CHANGE - Want to change the Quantity on Line Item in SO
Hi
I am facing a problem. The requirement is to change the Sales Order Item Quantity. I basically planned to update the quantity of Schedule Item which needs to be changed. When I run the below code, it works and says the Sales Order changed succesfully. However I get an express message saying the Database update failure. I don't get any sort of technical information.
Appreciate if you could help me finding the error.
Thanks
regards
girish
Note --> I am trying to change the Quantity for 2 line item in SO '56' to 40 Units.
REPORT ZBAPI_SALESORD_CHANGE.
data : zBAPISDHD type /AFS/BAPISDHD,
zORDER_HEADER_INX TYPE /AFS/BAPISDHDX,
zSALESDOCUMENT type BAPIVBELN-VBELN.
data : zORDER_ITEMS_IN like /AFS/BAPISDITM occurs 0 with header line,
zORDER_ITEM_INX like /AFS/BAPISDITMX occurs 0 with header line,
zORDER_SCHEDULES_IN like /AFS/BAPISDSCHD occurs 0 with header line,
ZSCHEDULE_LINESX LIKE /AFS/BAPISDSCHDX occurs 0 with header line,
zORDER_PARTNERS like BAPIPARNR occurs 0 with header line,
zRETURN like BAPIRET2 occurs 0 with header line,
so_no type BAPIVBELN-VBELN,
zPARTNERCHANGES like BAPIPARNRC occurs 0 with header line.
data : l_comp_qty like zORDER_ITEMS_IN-COMP_QUANT.
data : g_qty like /AFS/BAPISDSCHD-REQ_QTY.
g_qty = 40.
l_comp_qty = 40.
clear : zBAPISDHD.
so_no = '0000000056'.
zBAPISDHD-REFOBJTYPE = '/AFS/ORDER'.
zBAPISDHD-SALES_ORG = 'BP01'.
zBAPISDHD-DISTR_CHAN = '02'.
zBAPISDHD-DIVISION = '01'.
zBAPISDHD-PMNTTRMS = '0001'.
zORDER_HEADER_INX-UPDATEFLAG = 'U'.
zORDER_HEADER_INX-SALES_ORG = 'X'.
zORDER_HEADER_INX-DISTR_CHAN = 'X'.
zORDER_HEADER_INX-DIVISION = 'X'.
zORDER_HEADER_INX-PMNTTRMS = 'X'.
**********ITEM ***************************************
zORDER_ITEMS_IN-ITM_NUMBER = '00020'.
zORDER_ITEMS_IN-MATERIAL = 'F1202'.
zORDER_ITEMS_IN-PLANT = 'BP01'.
zORDER_ITEMS_IN-ITEM_CATEG = 'TAS'.
zORDER_ITEMS_IN-SHIP_POINT = 'BP01'.
zORDER_ITEMS_IN-COMP_QUANT = l_comp_qty.
zORDER_ITEMS_IN-TARGET_QTY = l_comp_qty.
zORDER_ITEMS_IN-TARGET_QU = 'ST'.
append zORDER_ITEMS_IN.
zORDER_ITEM_INX-ITM_NUMBER = '00020'.
zORDER_ITEM_INX-UPDATEFLAG = 'U'.
zORDER_ITEM_INX-MATERIAL = 'X'.
zORDER_ITEM_INX-PLANT = 'X'.
zORDER_ITEM_INX-ITEM_CATEG = 'X'.
zORDER_ITEM_INX-SHIP_POINT = 'X'.
zORDER_ITEM_INX-COMP_QUANT = 'X'.
zORDER_ITEM_INX-TARGET_QTY = 'X'.
zORDER_ITEM_INX-TARGET_QU = 'X'.
append zORDER_ITEM_INX.
*********SCHEDULE LINE******************************
refresh zORDER_SCHEDULES_IN.
clear zORDER_SCHEDULES_IN.
zORDER_SCHEDULES_IN-ITM_NUMBER = '000020'.
zORDER_SCHEDULES_IN-SCHED_LINE = '0001'.
zORDER_SCHEDULES_IN-REQ_DATE = '20070525'.
zORDER_SCHEDULES_IN-DATE_TYPE = '1'.
zORDER_SCHEDULES_IN-SCHED_TYPE = 'CS'.
zORDER_SCHEDULES_IN-GRID_VALUE = 'BLK2728'.
zORDER_SCHEDULES_IN-REQ_CATEGORY = '1DE'.
zORDER_SCHEDULES_IN-REFOBJTYPE = '/AFS/ORDER'.
zORDER_SCHEDULES_IN-REQ_QTY = g_qty.
append zORDER_SCHEDULES_IN.
refresh ZSCHEDULE_LINESX.
clear ZSCHEDULE_LINESX.
ZSCHEDULE_LINESX-ITM_NUMBER = '000020'.
ZSCHEDULE_LINESX-SCHED_LINE = '0001'.
ZSCHEDULE_LINESX-UPDATEFLAG = 'U'.
ZSCHEDULE_LINESX-REQ_DATE = 'X'.
ZSCHEDULE_LINESX-DATE_TYPE = 'X'.
ZSCHEDULE_LINESX-SCHED_TYPE = 'X'.
ZSCHEDULE_LINESX-GRID_VALUE = 'X'.
ZSCHEDULE_LINESX-REQ_CATEGORY = 'X'.
ZSCHEDULE_LINESX-REFOBJTYPE = 'X'.
ZSCHEDULE_LINESX-REQ_QTY = 'X'.
append ZSCHEDULE_LINESX.
CALL FUNCTION '/AFS/BAPI_SALESORD_CHANGE'
EXPORTING
SALESDOCUMENT = so_no
ORDER_HEADER_IN = zBAPISDHD
ORDER_HEADER_INX = zORDER_HEADER_INX
SIMULATION =
BEHAVE_WHEN_ERROR = ' '
INT_NUMBER_ASSIGNMENT = ' '
LOGIC_SWITCH =
TABLES
RETURN = zRETURN
ORDER_ITEM_IN = zORDER_ITEMS_IN
ORDER_ITEM_INX = zORDER_ITEM_INX
ORDER_SCHEDULE_LINES = zORDER_SCHEDULES_IN
ORDER_SCHEDULE_LINESX = ZSCHEDULE_LINESX.
PARTNERS =
PARTNERCHANGES = zPARTNERCHANGES
PARTNERADDRESSES =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
ORDER_TEXT =
ORDER_KEYS =
CONDITIONS_IN =
CONDITIONS_INX =
EXTENSIONIN =
*CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = so_no
ORDER_HEADER_IN = zBAPISDHD
ORDER_HEADER_INX = zORDER_HEADER_INX
TABLES
RETURN = zRETURN
ORDER_ITEM_IN = zORDER_ITEMS_IN
ORDER_ITEM_INX = zORDER_ITEM_INX
PARTNERS = zORDER_PARTNERS
PARTNERCHANGES = zPARTNERCHANGES
PARTNERADDRESSES =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
SCHEDULE_LINES = zORDER_SCHEDULES_IN
SCHEDULE_LINESX = ZSCHEDULE_LINESX.
ORDER_TEXT =
ORDER_KEYS =
CONDITIONS_IN =
CONDITIONS_INX =
EXTENSIONIN =
data : s_BAPIRET2 like BAPIRET2.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
importing
return = s_bapiret2.Hi,
Refer this code: Marked in bold
Get Line Item Details which are to be deleted
The line items fetched but not matching with ALV data
are the one which are copied from Reference Order
and should be deleted from our Sales Order
PERFORM get_line_item_details.
To get all the uploaded data
i_upload_2[] = i_upload[].
This is to be executed only if the SALES ORDER
IS CREATED WITH REFERENCE & User has selected
the record in ALV for Order Creation
LOOP AT i_upload INTO wa_upload_1
WHERE chkbx = 'X'
AND vbeln NE space.
MOVE wa_upload_1 TO wa_upload.
Clear Work Area/Local variables & Internal tables
CLEAR : l_sales_no,
l_item_number,
wa_header_in,
wa_header_inx,
wa_curr,
l_currency,
l_count,
l_counter.
REFRESH : i_cond,
i_cond_inx,
i_sch_in,
i_sch_inx,
i_items_in,
i_items_inx,
i_return,
i_partner_inx.
AT NEW seqno.
Get the Sales Order Number for corresponding record
READ TABLE i_result_all INTO wa_result_all WITH KEY
ref_no = wa_upload-vbeln
seqno = wa_upload-seqno.
IF sy-subrc EQ 0.
IF NOT wa_result_all-vbeln IS INITIAL.
l_sales_no = wa_result_all-vbeln.
ENDIF.
ELSE.
CONTINUE.
ENDIF.
READ TABLE i_curr INTO wa_curr
WITH KEY vbeln = l_sales_no.
Header Data
CLEAR wa_header_in.
wa_header_in-sales_org = wa_upload-vkorg.
wa_header_in-distr_chan = wa_upload-vtweg.
wa_header_in-division = wa_upload-spart.
wa_header_in-ref_doc = wa_upload-vbeln.
wa_header_in-ref_doc_l = wa_upload-vbeln.
wa_header_in-purch_no_c = wa_upload-bstnk.
CLEAR : wa_header_inx.
wa_header_inx-updateflag = 'U'.
wa_header_inx-sales_org = 'X'.
wa_header_inx-distr_chan = 'X'.
wa_header_inx-division = 'X'.
wa_header_inx-purch_no_c = 'X'.
Check Business Object
CLEAR : l_bus_object.
IF wa_upload-auart = 'ZY01' OR
wa_upload-auart = 'ZY07' OR
wa_upload-auart = 'ZY08' OR
wa_upload-auart = 'ZY09' OR
wa_upload-auart = 'ZY18' OR
wa_upload-auart = 'ZY94' .
l_bus_object = 'BUS2032'.
ELSEIF
wa_upload-auart = 'ZY10' OR
wa_upload-auart = 'ZY11' OR
wa_upload-auart = 'ZY27' OR
wa_upload-auart = 'ZY28' OR
wa_upload-auart = 'ZY92' OR
wa_upload-auart = 'ZY93'.
l_bus_object = 'BUS2102'.
ELSEIF
wa_upload-auart = 'ZY16' OR
wa_upload-auart = 'ZY30'.
l_bus_object = 'BUS2094'.
ELSEIF
wa_upload-auart = 'ZY17' OR
wa_upload-auart = 'ZY31'.
l_bus_object = 'BUS2096'.
ELSEIF
wa_upload-auart = 'ZY06' OR
wa_upload-auart = 'ZY26'.
l_bus_object = 'BUS2032'.
ENDIF.
*Populate Ship-to-party
IF NOT wa_upload-scode IS INITIAL.
CLEAR wa_partner_inx.
wa_partner_inx-document = l_sales_no.
wa_partner_inx-itm_number = '000000'.
wa_partner_inx-updateflag = 'U'.
wa_partner_inx-partn_role = c_we.
wa_partner_inx-p_numb_new = wa_upload-scode.
wa_partner_inx-refobjtype = l_bus_object.
APPEND wa_partner_inx TO i_partner_inx.
ENDIF.
Bill to Party
IF NOT wa_upload-bparty IS INITIAL.
CLEAR wa_partner_inx.
wa_partner_inx-document = l_sales_no.
wa_partner_inx-itm_number = '000000'.
wa_partner_inx-updateflag = 'U'.
wa_partner_inx-partn_role = c_re.
wa_partner_inx-p_numb_new = wa_upload-bparty.
wa_partner_inx-refobjtype = l_bus_object.
APPEND wa_partner_inx TO i_partner_inx.
ENDIF.
Payer
IF NOT wa_upload-payer IS INITIAL.
CLEAR wa_partner_inx.
wa_partner_inx-document = l_sales_no.
wa_partner_inx-itm_number = '000000'.
wa_partner_inx-updateflag = 'U'.
wa_partner_inx-partn_role = c_rg.
wa_partner_inx-p_numb_new = wa_upload-payer.
wa_partner_inx-refobjtype = l_bus_object.
APPEND wa_partner_inx TO i_partner_inx.
ENDIF.
Sales Rep
IF NOT wa_upload-salesrep IS INITIAL.
CLEAR wa_partner_inx.
wa_partner_inx-document = l_sales_no.
wa_partner_inx-itm_number = '000000'.
wa_partner_inx-updateflag = 'U'.
wa_partner_inx-partn_role = c_ys.
wa_partner_inx-p_numb_new = wa_upload-salesrep.
wa_partner_inx-refobjtype = l_bus_object.
APPEND wa_partner_inx TO i_partner_inx.
ENDIF.
Check condition type & unit price
For the following Document Types,
Condition Type & Unit Price are mandatory
CLEAR : l_item_number,
wa_upload_2.
LOOP AT i_upload_2 INTO wa_upload_2
WHERE seqno = wa_upload-seqno
AND chkbx = 'X'.
CLEAR : wa_cond,
wa_result.
Get the POSNR
PERFORM conv_alpha_input USING wa_upload_2-matnr
CHANGING wa_upload_2-matnr.
CLEAR : wa_items.
READ TABLE i_items INTO wa_items
WITH KEY vbeln = l_sales_no
matnr = wa_upload_2-matnr.
Check condition types
IF wa_upload_2-auart = 'ZY16' OR
wa_upload_2-auart = 'ZY17' OR
wa_upload_2-auart = 'ZY30' OR
wa_upload_2-auart = 'ZY31'.
If error, then update the output table
IF wa_upload_2-kschl IS INITIAL OR
wa_upload_2-kbetr IS INITIAL.
CLEAR : wa_result_all.
READ TABLE i_result_all INTO wa_result_all WITH KEY
ref_no = wa_upload_2-vbeln
mat_no = wa_upload_2-matnr
kwmeng = wa_upload_2-kwmeng
charg = wa_upload_2-charg
seqno = wa_upload_2-seqno
vbeln = l_sales_no.
IF sy-subrc EQ 0.
wa_result_all-status = 'E'. " E
wa_result_all-remarks = text-007. " Condition Type & Unit
Price is mandatory
MODIFY i_result_all FROM wa_result_all INDEX sy-tabix.
ENDIF.
CLEAR : wa_result_all.
CONTINUE.
Else update the condition type & unit price
ELSE.
wa_cond-itm_number = wa_items-posnr. " ITEM NO.
wa_cond-cond_type = wa_upload_2-kschl. " CNDTION TYPE
wa_cond-cond_value = wa_upload_2-kbetr. " UNIT PRICE
wa_cond-currency = wa_curr-waerk. " Currency
APPEND wa_cond TO i_cond.
CLEAR : wa_cond,
wa_upload_2.
ENDIF.
ELSE.
For other document type, fill Condition type & Unit Price
wa_cond-itm_number = wa_items-posnr. " ITEM NO.
wa_cond-cond_type = wa_upload_2-kschl. " CNDTION TYPE
wa_cond-cond_value = wa_upload_2-kbetr. " UNIT PRICE
wa_cond-currency = wa_curr-waerk.
APPEND wa_cond TO i_cond.
CLEAR : wa_cond,
wa_upload_2.
ENDIF.
CLEAR : wa_cond_inx.
wa_cond_inx-itm_number = wa_items-posnr.
wa_cond_inx-cond_type = wa_upload_2-kschl.
wa_cond_inx-cond_value = 'X'.
wa_cond_inx-currency = 'X'.
APPEND wa_cond_inx TO i_cond_inx.
CLEAR : wa_upload_2.
ENDLOOP.
DELETE Item Data from VBAP which has no matching entires in ALV
if SAME Material occurs more than once in ALV for same key then
count the no. of times the material occurs
CLEAR : wa_upload_3,
l_counter.
l_counter = 0.
LOOP AT i_upload_2 INTO wa_upload_3
WHERE seqno = wa_upload-seqno
AND chkbx = 'X'
AND matnr = wa_upload-matnr.
l_counter = l_counter + 1.
CLEAR : wa_upload_3.
ENDLOOP.
PERFORM conv_alpha_input USING wa_upload-matnr
CHANGING wa_upload-matnr.
check the corresponding no. of line items
for the above material
CLEAR : l_count,
wa_items.
LOOP AT i_items INTO wa_items
WHERE matnr = wa_upload-matnr
AND vbeln = l_sales_no.
CLEAR : wa_items_in,
wa_items_inx.
IF l_count GE l_counter.
wa_items_in-itm_number = wa_items-posnr.
wa_items_in-material = wa_items-matnr.
APPEND wa_items_in TO i_items_in.
CLEAR wa_items_inx.
wa_items_inx-itm_number = wa_items-posnr.
wa_items_inx-updateflag = 'D'. " Delete Record
wa_items_inx-material = 'X'.
APPEND wa_items_inx TO i_items_inx.
ENDIF.
l_count = l_count + 1.
ENDLOOP.
Convert material nos. to 18 digit no.
REFRESH : i_upload_3.
CLEAR : wa_upload_3.
i_upload_3[] = i_upload_2[].
LOOP AT i_upload_3 INTO wa_upload_3
WHERE seqno = wa_upload-seqno
AND chkbx = c_x.
PERFORM conv_alpha_input USING wa_upload_3-matnr
CHANGING wa_upload_3-matnr.
MODIFY i_upload_3 FROM wa_upload_3.
CLEAR : wa_upload_3.
ENDLOOP.
Delete materials which are not in ALV but are in line items
for that sales order
CLEAR : wa_upload_3,
wa_items_in,
wa_items.
LOOP AT i_items INTO wa_items WHERE vbeln = l_sales_no.
PERFORM conv_alpha_input USING wa_items-matnr
CHANGING wa_items-matnr.
READ TABLE i_upload_3 INTO wa_upload_3
WITH KEY matnr = wa_items-matnr.
IF sy-subrc NE 0.
wa_items_in-itm_number = wa_items-posnr.
wa_items_in-material = wa_items-matnr.
APPEND wa_items_in TO i_items_in.
CLEAR wa_items_inx.
wa_items_inx-itm_number = wa_items-posnr.
wa_items_inx-updateflag = 'D'. " Delete Record
wa_items_inx-material = 'X'.
APPEND wa_items_inx TO i_items_inx.
ENDIF.
CLEAR : wa_items,
wa_items_in,
wa_items_inx,
wa_upload_3.
ENDLOOP.
UPDATE Item Data RECORDS
CLEAR : wa_upload_2,
wa_items_in,
wa_items,
wa_items_inx,
wa_sch_in,
wa_sch_inx,
l_item_number.
LOOP AT i_upload_2 INTO wa_upload_2 WHERE
seqno = wa_upload-seqno
AND chkbx = 'X'.
Read the Material no. from ALV & check whether the
corresponding material exists in VBAP, if YES, then
Update the line item data
PERFORM conv_alpha_input USING wa_upload_2-matnr
CHANGING wa_items_in-material.
POPULATE ITEM NO -- Update the record
If line item has same material twice,
then appropriate POSNR should be assigned
READ TABLE i_items INTO wa_items
WITH KEY vbeln = l_sales_no
matnr = wa_items_in-material.
IF sy-subrc EQ 0.
If Reference is not contract then the process to assign
POSNR is as follows :- Check the corresponding material
from ALV with data from ITEMS, the record which matches
the data is selected & POSNR is assigned to it
IF wa_upload_2-oreason NE 'C'.
CLEAR : wa_items_in1.
READ TABLE i_items_in INTO wa_items_in1
WITH KEY material = wa_items_in-material
itm_number = wa_items-posnr.
IF sy-subrc EQ 0.
CLEAR : wa_items1.
LOOP AT i_items INTO wa_items1
WHERE vbeln = l_sales_no
AND matnr = wa_items_in-material.
IF wa_items1-posnr GT wa_items-posnr.
wa_items-posnr = wa_items1-posnr.
CLEAR : wa_items_in1.
READ TABLE i_items_in INTO wa_items_in1
WITH KEY material = wa_items_in-material
itm_number = wa_items-posnr.
IF sy-subrc NE 0.
EXIT.
ENDIF.
ENDIF.
CLEAR : wa_items1.
ENDLOOP.
ENDIF.
ELSE.
If Reference is CONTRACT then the process to assign
POSNR is different. Here if ALV has same material
twice & ITEMS has it once, then the second occurrence
of material of ALV is assigned a new POSNR
CLEAR : wa_items_in1,
l_insert.
READ TABLE i_items_in INTO wa_items_in1
WITH KEY material = wa_items_in-material
itm_number = wa_items-posnr.
IF sy-subrc EQ 0.
CLEAR : l_lines,
l_insert,
wa_items_in1.
DESCRIBE TABLE i_items_in LINES l_lines.
READ TABLE i_items_in INTO wa_items_in1 INDEX l_lines.
wa_items-posnr = wa_items_in1-itm_number + 10.
l_insert = 'X'.
CLEAR : wa_items_in1.
ENDIF.
ENDIF.
<b> wa_items_in-itm_number = wa_items-posnr.
wa_items_in-target_qty = wa_upload_2-kwmeng.
wa_items_in-target_qu = wa_items-zieme.
wa_items_in-store_loc = wa_upload_2-lgort.
wa_items_in-plant = wa_upload_2-werks.
wa_items_in-batch = wa_upload_2-charg.
wa_items_in-route = wa_upload_2-route.
wa_items_in-sales_unit = wa_upload_2-vrkme.
wa_items_in-short_text = wa_upload_2-maktx.
APPEND wa_items_in TO i_items_in.</b>
CLEAR wa_items_inx.
wa_items_inx-itm_number = wa_items-posnr.
IF l_insert EQ c_x.
wa_items_inx-updateflag = c_i. " Insert Record
ELSE.
wa_items_inx-updateflag = 'U'. " Update Record
ENDIF.
wa_items_inx-material = 'X'.
wa_items_inx-target_qty = 'X'.
wa_items_in-target_qu = 'X'.
wa_items_inx-store_loc = 'X'.
wa_items_inx-plant = 'X'.
wa_items_inx-batch = 'X'.
wa_items_inx-route = 'X'.
wa_items_inx-short_text = 'X'.
APPEND wa_items_inx TO i_items_inx.
ENDIF.
*Populate Ship-to-party
IF NOT wa_upload_2-scode IS INITIAL
AND l_insert IS INITIAL.
CLEAR wa_partner_inx.
wa_partner_inx-document = l_sales_no.
wa_partner_inx-itm_number = wa_items-posnr.
wa_partner_inx-updateflag = 'U'.
wa_partner_inx-partn_role = c_we.
wa_partner_inx-p_numb_new = wa_upload_2-scode.
wa_partner_inx-refobjtype = l_bus_object.
APPEND wa_partner_inx TO i_partner_inx.
ENDIF.
Bill to Party
IF NOT wa_upload_2-bparty IS INITIAL
AND l_insert IS INITIAL.
CLEAR wa_partner_inx.
wa_partner_inx-document = l_sales_no.
wa_partner_inx-itm_number = wa_items-posnr.
wa_partner_inx-updateflag = 'U'.
wa_partner_inx-partn_role = c_re.
wa_partner_inx-p_numb_new = wa_upload_2-bparty.
wa_partner_inx-refobjtype = l_bus_object.
APPEND wa_partner_inx TO i_partner_inx.
ENDIF.
Payer
IF NOT wa_upload_2-payer IS INITIAL
AND l_insert IS INITIAL.
CLEAR wa_partner_inx.
wa_partner_inx-document = l_sales_no.
wa_partner_inx-itm_number = wa_items-posnr.
wa_partner_inx-updateflag = 'U'.
wa_partner_inx-partn_role = c_rg.
wa_partner_inx-p_numb_new = wa_upload_2-payer.
wa_partner_inx-refobjtype = l_bus_object.
APPEND wa_partner_inx TO i_partner_inx.
ENDIF.
Sales Rep
IF NOT wa_upload_2-salesrep IS INITIAL
AND l_insert IS INITIAL.
CLEAR wa_partner_inx.
wa_partner_inx-document = l_sales_no.
wa_partner_inx-itm_number = wa_items-posnr.
wa_partner_inx-updateflag = 'U'.
wa_partner_inx-partn_role = c_ys.
wa_partner_inx-p_numb_new = wa_upload_2-salesrep.
wa_partner_inx-refobjtype = l_bus_object.
APPEND wa_partner_inx TO i_partner_inx.
ENDIF.
Populate schedule Line
CLEAR : l_datum,
wa_sch_in.
For following condition types, schedule lines not required
IF wa_upload_2-auart EQ 'ZY16' OR
wa_upload_2-auart EQ 'ZY17' OR
wa_upload_2-auart EQ 'ZY30' OR
wa_upload_2-auart EQ 'ZY31'.
ELSE.
wa_sch_in-itm_number = wa_items-posnr.
wa_sch_in-sched_line = '0001'.
wa_sch_in-req_qty = wa_upload_2-kwmeng.
IF NOT wa_upload_2-vdatu IS INITIAL.
REPLACE ALL OCCURRENCES OF '.' IN wa_upload_2-vdatu WITH ' '.
CONDENSE wa_upload_2-vdatu NO-GAPS.
CLEAR : l_datum.
l_datum = wa_upload_2-vdatu.
wa_sch_in-req_date = l_datum.
ENDIF.
APPEND wa_sch_in TO i_sch_in.
CLEAR wa_sch_inx.
wa_sch_inx-itm_number = wa_items-posnr.
wa_sch_inx-sched_line = '0001'.
IF wa_upload_2-oreason = 'C'.
wa_sch_inx-updateflag = c_i.
ELSE.
wa_sch_inx-updateflag = 'U'.
ENDIF.
wa_sch_inx-req_qty = 'X'.
wa_sch_inx-req_date = 'X'.
APPEND wa_sch_inx TO i_sch_inx.
ENDIF.
CLEAR : wa_upload_2,
wa_items_in,
wa_items,
wa_items_inx,
wa_sch_in,
wa_sch_inx.
ENDLOOP. "LOOP AT i_upload to wa_UPLOAD_2
Change Sales Order
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = l_sales_no
order_header_in = wa_header_in
order_header_inx = wa_header_inx
SIMULATION =
BEHAVE_WHEN_ERROR = ' '
INT_NUMBER_ASSIGNMENT = ' '
LOGIC_SWITCH =
TABLES
return = i_return
order_item_in = i_items_in
order_item_inx = i_items_inx
partners = i_partner
partnerchanges = i_partner_inx
PARTNERADDRESSES =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
schedule_lines = i_sch_in
schedule_linesx = i_sch_inx
ORDER_TEXT =
ORDER_KEYS =
conditions_in = i_cond
conditions_inx = i_cond_inx
EXTENSIONIN =
COMMIT
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = ' '
IMPORTING
return = wa_commit.
WAIT UP TO 5 SECONDS.
Best regards,
Prashant -
How to read long text in Document line item
Hi,
How to read long text in FI Document line item.Use Read_text function module.
you need to pass
ID
LANGUAGE
NAME
OBJECT to the function moduel
To find the Text id name language and object these are the following steps. Example: FB02
1. goto FB02, Enter Document number
2. from menuselect Goto>Header-->header Text..... New window will be displayed
3. select the Header Text. here you can see all the text.
4. click on the TEXT (which you want to know the Text id) , then press log ICON (you can find in bottom right of the text window) it looks like a rolled paper.
5. in the Next window you will find Text Name. Text ID, Language. etc...
Regards,
Lalit Mohan Gupta. -
Want to copy Delivery address of one line item in shopping cart to all item
Hi Experts,
We are upgrading from SRM 5.0 to SRM 7.0,In SC Creation We want to copy Delivery address of one line item in shopping cart to all line items in Shopping cart by clicking Change All Items button.This is custom button we added this button and we had written code to achieve the functionality but it is not working.This is same like Change All Items button in Account Assigment for copy accont details of one line item to all other line items in SC.
Web Dynpro Component:/SAPSRM/WDC_UI_DO_SHIPTO
Web Dynpro View:V_DODC_SHIPTO
Thanks,
Aarthi.Hi Prasad,
Our customer needs that button,they want whenever they are clicking the button delivery address should copy to all line items.
In my action ONCHANGE_ALL_ITEMS i called this method
wd_this->mo_dodm_shipto->zchange_all_items( ).
zchange_all_items( ) is implemented in class /SAPSRM/CL_CH_WD_DODM_SHIPTO.
the code i wrote inside zchange_all_items( )
*Error
DATA: LX_PDO_ABORT TYPE REF TO /SAPSRM/CX_PDO_ABORT, " Class for Fatal error caught by PDO Layer
LX_PDO_ERROR TYPE REF TO /SAPSRM/CX_PDO_ERROR. " Class for PDO General Exception
Object Instances
DATA: LO_MSG_CONSUMER TYPE REF TO /SAPSRM/IF_PDO_MSG_CONSUMER,
LO_PDO_SHIPTO TYPE REF TO /SAPSRM/IF_PDO_DO_PARTNER.
Context-Data
DATA: lte_cll_shipto TYPE /sapsrm/if_ch_wd_set_facade=>gt_guid_element,
loe_cll_shipto TYPE REF TO /sapsrm/if_ch_wd_set_element.
Field Symbols
FIELD-SYMBOLS <lse_cll_shipto> LIKE LINE OF lte_cll_shipto.
DATA : lo_pdo_acc TYPE REF TO /sapsrm/if_pdo_do_acct_assgmnt.
DATA : ls_shipto_cll type /SAPSRM/S_CLL_SHIPTO,
lt_pdo_partnerdetails TYPE bbp_pdt_partner,
ls_pdo_partnerdetails TYPE bbp_pds_partner,
LV_GUID TYPE BBP_GUID,
lv_item_guid type bbp_guid,
lv_filled TYPE wdy_boolean.
*exceptions
DATA : LX_ABORT TYPE REF TO /SAPSRM/CX_PDO_ABORT.
*Constants
CONSTANTS : LC_OBJECT_ID TYPE CRMT_SUBOBJECT_CATEGORY_DB VALUE 'BUS2121001',
LC_ADDR_ORIGIN TYPE /SAPSRM/S_CLL_SHIPTO-ADDR_ORIGIN VALUE 'B'.
IF LV_FILLED = ABAP_TRUE.
Downcasting to shipto
LO_PDO_SHIPTO ?= MO_PDO.
insert the clipboard into facade and update and submit update
me->/sapsrm/if_cll_do_mapper~insert_from_clipboard( io_set_facade = mon_cll_set_facade ).
Add new Accounting entries.
lte_cll_shipto = mon_cll_set_facade->get_data_elements( ). "get all elements from the context
LOOP AT lte_cll_shipto ASSIGNING <lse_cll_shipto>.
loe_cll_shipto = <lse_cll_shipto>-set_element.
loe_cll_shipto->get_static_attributes( IMPORTING rv_attributes = ls_shipto_cll ).
Map ui-structure to pdo-structure
MOVE-CORRESPONDING ls_shipto_cll TO ls_pdo_partnerdetails.
IF LS_SHIPTO_CLL-PARTNER_FCT = mv_part_func.
LS_PDO_PARTNERDETAILS-PARTNER_FCT = ''.
ELSE.
LS_PDO_PARTNERDETAILS-PARTNER_FCT = LS_SHIPTO_CLL-PARTNER_FCT.
ENDIF.
IF ls_pdo_partnerdetails-del_ind NE 'X'.
CALL FUNCTION 'GUID_CREATE'
IMPORTING
ev_guid_16 = ls_pdo_partnerdetails-p_guid.
mv_acc_guid_split = ls_pdo_shipto-guid .
IF mo_scope = 1.
ls_pdo_partnerdetails-p_guid = mon_cll_set_facade->get_bo_guid( ).
ELSE.
ls_pdo_partnerdetails-p_guid = mo_parent_bo_mapper->items_get_lead_selection( ).
ENDIF.
APPEND ls_pdo_partnerdetails TO lt_pdo_partnerdetails.
ENDIF.
CLEAR : ls_pdo_partnerdetails, ls_shipto_cll.
ENDLOOP.
Add New items to PDO
IF NOT lt_pdo_partnerdetails[] IS INITIAL.
TRY.
LO_PDO_SHIPTO->update_item_partners( EXPORTING it_partner = lt_pdo_partnerdetails
iv_item_guid = lv_item_guid
CHANGING co_message_handler = mo_pdo_message_consumer ).
CATCH /sapsrm/cx_pdo_abort INTO lx_pdo_abort.
mo_cll_message_handler->set_abort( io_pdo_abort_exception = lx_pdo_abort ).
CATCH /sapsrm/cx_pdo_error INTO lx_pdo_error.
mo_cll_message_handler->add_exception( io_pdo_error_exception = lx_pdo_error ).
ENDTRY.
Update PDO with the changed data.
TRY.
mo_pdo->submit_update( ).
CATCH /sapsrm/cx_pdo_abort INTO lx_pdo_abort.
mo_cll_message_handler->set_abort( io_pdo_abort_exception = lx_pdo_abort ).
CATCH /sapsrm/cx_pdo_error INTO lx_pdo_error.
mo_cll_message_handler->add_exception( io_pdo_error_exception = lx_pdo_error ).
ENDTRY.
Fire refresh of DO Mappers registered for refresh since the item table has acc related data.
mo_parent_bo_mapper->fire_event_refresh( iv_perform_updates = abap_false ).
ENDIF.
ENDIF.
Thanks,
Aarthi. -
Remove symbol # for long text in document line item
Dear Experts,
I enter some information in the long text field in document line item. For the area that I use "Tab" button, system will display as # symbol. Therefore when we print the information, the output will include the #### symbol which is not correct.
Please help.
Thanks.
-Syaban-Dear Gaurav Aggarwal,
Thanks for the reply, can you guide me the step to perform the suggested solutions? currently, we are using ECC6.
Thanks.
syaban -
Post long text for document line item via FI-GL Inbound IDoc
Hi guru,
I am trying post extension ZFIDCP02 linked basic type FIDCCP02 and message type FIDCC2 IDoc in R/3 (4.6c) via IBM Websphere (Inbound IDoc),
I am use inbound function module IDOC_INPUT_FIDCC2 and activate exit 008 (EXIT_SAPLF050_008) and exit 002 (EXIT_SAPLF050_002),
In the extension ZFIDCP02 and under E1FISEG, I am add my segment ZITEXT include field TDSPRAS, TDID, TDOBJECT, TDLINE.
I am send ZFIDCP02 IDoc via IBM Websphere no error but all field TDSPRAS, TDID, TDOBJECT, TDLINE in my segment ZITEXT not post in FI-GL.
How can I post long text for document line item (ZITEXT) in FI-GL ?.
and I'm mean post ZITEXT to bank statement via IDOC.
Please throw light on this and may be I 'm want solution or example ABAP code for exit 002 (EXIT_SAPLF050_002).
Thanks in advance,
Akkapong Pirachai
CAT Telecom
Edited by: Akkapong Pirachai on Aug 20, 2008 7:40 AMClose question because long time for answer.
-
The financial document and sales order control is missing at delivery order
The financial document is assigned at sales order line. The system is not restricting to deliver the goods of cost less than or equal to value of financial document.
Suppose a financial document with a value of 10000USD is assigned to a sales order of value 20000.In this case system is letting me to make the delivery order and PGI of cost 20000.I want the system to restrict to deliver the items of cost 10000USD.
Note=In xd01 i have mentioned the payment guarantee procedure=Letter of credit but not the credit control area.
Regards :VijayHi,
1st check your FD to determine whether or not there is an allowed overdraft. If there isnt one than check IMG Tx VX52, Finnancial Document Conditions, check value:
"Even if you do not set this switch - that is, there is no value check in the SD document -, the system subtracts the consumed values from the total value of the financial document.
In this case, the subtracted value may exceed the total value of the financial document because the check, but not the update, is deactivated."
Regards
Kikas
Maybe you are looking for
-
Multiple Game Center accounts in one Apple ID
Is it possible to have more than one Game Center account under one Apple ID? My wife and I share an ID, but want different accounts so that we can play each other. It must have been possible because we were somehow doing that before IOS 6. If I log o
-
C6150 All In One is not recognized over network
My printer works fine for printing over the network. My problem is that I cannot initiate a scan to computer, or initiate from within HP solution center. I can access and interact with my printer directly via the web browser interface. The HP driv
-
How to judge whether the paragraph ending?
Hi, How to judge whether the paragraph ending with js? thks. goldbridge
-
I have a mac OS x version 10.4.11 2 GHz Intel Core 2 Duo 1 GB 667 MHz DDR2 SDRAm. Can I use Crucial 2 x 1 GB 667 MHz DDR2 SDRAN to upgrade memory?
-
Can't install google or comcast toolbars
I just installed firefox 5 . tryed to install my google toolbar and my comcast tool bar . Both come back saying unable to install in ff5 . I assumed ff would get better as it went along . Do I have to uninstall ff5 and go back to a older version ? Or