Hi STO Error
Hi Experts
Please solve my thread even assignment i checked according to sap standard but still error coming **" purchase order
xxxxxxxxx does not contain items for stock transfer"* in MB1B transaction tell me where i did mistake even i am SD consultant
not able to identify,so please any one can help.
NOTE: Dont lock the tread until getting solved bcz even i checked all previous threads also.
Edited by: rushiker on Oct 19, 2011 5:37 AM
Hi
check you have shipping tab in Po at item level
check following link
[Purchase order xxx 10002 does not contain items for a stock transfer;
Regards
Kailas Ugale
Similar Messages
-
STO error: No Purchasing Group determined
Hi,
There is one *STO error message* occurred when i creating optical service order.
I am trying to create a Optical Service Order and when I going to save it as completely billed, STO error occurs with message: No Purchasing Group determined.
Could somebody help me in this regard and explain the steps to solve the issue.
Thanks in Advance...
Ur Help will be highly beneficial......
Regards
Amandeep K. DhaliwalHi
product category are directly related to purchase group. depends upon the settings in the organisation structure , the system determines which purchase group is responsible for procuring this product category.
so back track your product category and purchase group link and this purchase group is made a link with purchase organisation. since product category responsiblity is a mandatory in srm.
Can you update here . where your user was positioned in org structure?
hope that you made a link between purch organ with purchase group?
po1
--> pg1
and moreover check following settings. are you try to procure via describe (spl request)?
Purchase group - responsibilty tab what are the product category you mentioned?
have you maintain Organisation responsibility under the responsibility tab?.
still you find difficulty ?
regards
muthu -
Sap Archiving u0096 STO error on version ECC 6.0
Hi experts. I take a long of time with this error and I hope that you can help me. Explain the program.
We have a archiving project of no standard objects. This objects run on Sap version 4.6C, but now, on version ECC 6.0, the Store program give a execution error. The log of the STO Job on Sara transaction is the follow:
Job started
Step 001 started (program RSARCH_STORE_FILE, variant , user ID ARUIZ)
Archive file 000241-001ZIECI_RF02 is being processed
Archive file 000241-001ZIECI_RF02 does not exist (Message no. BA111)
Error occured when checking the stored archive file 000241-001ZIECI_RF02 (Message no. BA194)
Job cancelled after system exception ERROR_MESSAGE (Message no. 00564)
The Write and Delete programs runs correctly.
A strandar Archiving Object like FI_TCJ_DOC runs Ok (WRI, DEL and STO programs). The customazing for both objects are nearly on OAC0, FILE transactions. The changes are on Sap Directories. Write for you the most important customazing actions:
Transaction: FILE
ZIECI_RF02 (No Standard)
Logical File Path --> ZZA_ARCHIVE_GLOBAL_PATH
Physical Path --> /usr/sap/CX6/ADK/files/ZA/<FILENAME>
Logical File Name Definition -->
ZZA_ARCHIVE_DATA_FILE_ZIECI_RF02
FI_TCJ_DOC (Standard)
Logical File Path --> ARCHIVE_GLOBAL_PATH
Physical Path --> <P=DIR_GLOBAL>/<FILENAME>
Logical File Name Definition --> ARCHIVE_DATA_FILE
Transaction: AOBJ
Customazing settings:
ZIECI_RF02
Logical File Name --> ZZA_ARCHIVE_DATA_FILE_ZIECI_RF02
FI_TCJ_DOC (Standard)
Logical File Name --> ARCHIVE_DATA_FILE
I prove to put in own archiving object (ZIECI_RF02) the logical file name -> ARCHIVE_DATA_FILE too and the error go on.
In the others parameters the values for both objects are:
Delete Jobs: Start Automatically
Content Repository: ZA (Start Automatically)
Sequence: Delete Before Storing
I see the point of the storing STO program (RSARCH_STORE_FILE) where own archiving failed. I made a program with the function and debbuging this can see the next:
REPORT zarm_06_prueba_http_archivado.
DATA: LENGTH TYPE I,
T_DATA TYPE table of TABL1024.
BREAK ARUIZ.
CALL FUNCTION 'SCMS_HTTP_GET'
EXPORTING
mandt = '100'
crep_id = 'ZA'
doc_id = '47AAF406C02F6C49E1000000805A00A9'
comp_id = 'data'
offset = 0
length = 4096
IMPORTING
length = length
TABLES
data = t_data
EXCEPTIONS
bad_request = 1
unauthorized = 2
not_found = 3
conflict = 4
internal_server_error = 5
error_http = 6
error_url = 7
error_signature = 8
OTHERS = 9.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
If execute the program, SAP returns the next error:
Error in HTTP Access: IF_HTTP_CLIENT -> RECEIVE 1
The sy-subrc variable value is 6 -> error_http
The call of the method is the follow:
call method http_client->receive
exceptions
http_communication_failure = 1
http_invalid_state = 2
others = 3
sy-subrc value is 1 -> http_communication_failure
The unusual of the case are that the Archiving Objects work on SAP 4.6C perfectly,
furthermore on version ECC 6.0 the standard and no standard objects uses Sap Content Server with the same connection (HTTP), IP, PORT and Repository.
I hope that anypeople can help me. A lot of thanks for your time.
Best Regards.Hi Samanjay.
Answer your questions:
1) I proved the archiving from Sara with the Object ZIECI_RF02 with both customazings. The Stored program fail with logical file name = ZZA_ARCHIVE_DATA_FILE_ZIECI_RF02 and logical file name = ARCHIVE_DATA_FILE (Example at answer 2).
2) AL11 Transaction (Sap Directories):
/usr/sap/CX6/ADK/files/ZA/
cx6adm 09.04.2008 18:02:15 ZIECI_RF02_20080409.180215.ARUIZ
This is the Fich from ZIECI_RF02 on AL11. I prove this yesterday. The variable name: 000241-001ZIECI_RF02 is the generate to save the fich on repository ZA. In this case the variable name is: 000342-001ZIECI_RF02. Can view this with the table ADMI_FILES on TA SE11.
Entries on ADMI_FILES with create date = 09.04.2008
DOCUMENT: 342
ARCHIV KEY: 000342-001ZIECI_RF02
CREAT DATE: 09.04.2008
CREAT TIME : 18:18:28
OBJ COUNT: 1
FILENAME: ZIECI_RF02_20080409.18182
STATUS OPT: Not Stored
STATUS FIL: Archiving Completed
PATHINTERN: ZZA_ARCHIVE_GLOBAL_PATH
CREP:
ARCH DOCID:
Now, I put the same information from FI_TCJ_DOC (Standard Object):
AL11 Transaction (Sap Directories):
/usr/sap/CX6/SYS/global
cx6adm 10.04.2008 11:24:15 FI_FI_TCJ_DOC_20080410_112409_0.ARCHIVE
Entries on ADMI_FILES with create date = 10.04.2008
DOCUMENT: 343
ARCHIV KEY: 000343-001FI_TCJ_DOC
CREAT DATE: 10.04.2008
CREAT TIME: 11:24:09
OBJ COUNT: 2
FILENAME: FI_FI_TCJ_DOC_20080410_112409_0.ARCHI
STATUS OPT: Stored
STATUS FIL: Archiving Completed
PATHINTERN: ARCHIVE_GLOBAL_PATH
CREP: ZA
ARCH DOCID: 47FD890364131EABE1000000805A00A9
Finally, made the example with Archiving Object ZIECI_RF02, but assigning the standard logical file.
AOBJ (Customazing settings):
Object Name: ZIECI_RF02 Archivado de datos: Facturas de Baja
Logical File Name: ARCHIVE_DATA_FILE
Now, execute the archiving at SARA transaction.
AL11 Transaction (Sap Directories):
/usr/sap/CX6/SYS/global
cx6adm 10.04.2008 12:33:25 FI_ZIECI_RF02_20080410_123324_0.ARCHIVE
Entries on ADMI_FILES with create date = 10.04.2008
DOCUMENT: 345
ARCHIV KEY: 000345-001ZIECI_RF02
CREAT DATE: 10.04.2008
CREAT TIME: 12:33:24
OBJ COUNT: 1
FILENAME: FI_ZIECI_RF02_20080410_123324_0.ARCHIVE
STATUS OPT: Not Stored
STATUS FIL: Archiving Completed
PATHINTERN: ARCHIVE_GLOBAL_PATH
CREP:
ARCH DOCID:
It´s that the unusual. At first, I thought that´s the problem was the directory of SAP, but with this proof I looked a new error reason.
3) The details of repository ZA are:
Content Rep: ZA
Description: Document Area
Document Area: Data Archiving
Storage type: HTTP Content Server
Version no: 0046 Content Server version 4.6
HTTP server: 128.90.21.59
Port Number: 1090
HTTP Script: ContentServer/ContentServer.dll
Phys. Path: /usr/sap/CX6/SYS/global/
Too much thanks for your answer and your time. If you have any doubt, question me.
Best regards. -
KANBAN - STO (error : Goods movement not possible with mvmt type 351)
Hi,
I have configured KANBAN STO in the system which is working fine.
I am able to empty the bin and create STO (purchase orders)
But when I select a bin and try to make it full, system gives error message:
"Goods movement not possible with mvmt type 351"
In KANBAN STO replenishment strategy, I have used movement type 101,
I m little confused from where this 351 movement type is coming from.
Please help resolvethis issue.
PavanHi,
Below is the entire message:
Goods movement not possible with mvmt type 351
Message no. M7096
Diagnosis
You have entered a movement type that has not been defined for this transaction/event.
Procedure
Choose another movement type.
You can choose the movement type as follows:
If you know the movement type, enter it directly in the Movement type field.
Choose the movement type via the menu option Movement type.
Choose the required movement type from the possible entries.
If you do not find a suitable movement type, exit this function and choose a different goods movement from the Inventory Management menu.
Pavan -
WHN CREATING STO WRT STO,ERROR
Hi all,
please tell me how to resolve an error ie 'CUSTOMER NO AND PO NUMBER MISMATCH' which is coming while doing SALES ORDER from STO .I have maintained corrctly the customer master alsoDear,
It is not possible to create both STO and Sales order. When you done the STO then there is no requirement of create sales order.
Please clear your question.
Regards,
Sandip -
Receiving project stock from a STO error entry (101 X X _ B X P)
Hi there,
Does anybody know how to receive material that is special stock posting to a WBS element, coming from a STO? The error message M7226 entry (101 X X _ B X P) seems to me like an error in the program because the entry in the table T156 is not available. And it looks like there isn´t any way of adding new entries in transaction OMJJ to this table.
Its funny because I dont have any problems transfering materials from centers (mvt 301Q) or consuming them with mvt 221 Q, I can even use mvt 351Q to put material in transfer, but I can´t on any way, receive the material that is in transfer.
I´ve looked to some notes on the SAP portal and they are really old and talk about program corrections to solve message M7226, but they should be already solved by the SAP 5.0 (this is the one I´m using).
Please help!!!Hi,
Try this way -
SPRO >Materials Management>Inventory Management and Physical Inventory>Movement Types>Copy, Change Movement Types
When you get into this config area, select movement type 101 (From and To)
Then on the left side, select Update control / WM movement types
on the right side of the screen, you will see update control/wmmovement types
The error you received is due to a missing entry in this table.
The missing entry is not given by standard SAP. You can neither make a new entry from this configuration. The alternative is to update a new entry from SM30 transaction, enter V_156SC_VC and hit maintain.
Here you can make new entries. Using new entries, copy
101 _ B _ P with the rest of entries.
It will work. This is the crux of MM. Let me know if you still need help. I am confident that your issue will be resolved with this. If it helped, please reward the points.
Regards -
STO - ERROR IN ME21N - sadhu kishore , ayub .
HI ALL ,
WHILE trying to transfer stock between 2 plants in different copmany codes , in ME21N the system is unable to recognise the IMG config , thou all is fine .
can any one pl guide ?
pl do guide with reg to stock between 2 plants in different copmany codes .
well all is fine with stock transfer between 2 plants in one company code .
Thanks ,
jerryIn the ME21N create screen Click on ALT+F12 (Custom Local Layout) click on Option>Click on Expert in the Controls> flag the check box:
Show Keys in All Dropdown list
& Sort items by Key
Click apply and ok
regards
John -
HI ALL ,
WHILE trying to transfer stock between 2 plants in different copmany codes , in ME21N the system is unable to recognise the IMG config , thou all is fine .
can any one pl guide ?
pl do guide with reg to stock TRANSFER between 2 plants in different copmany codes .
Thanks ,
JERRYStock transfer can happen only within same company code.
If the plants belong to different company codes, then you need to do intercompany sales. -
Inter company STO-how to reduce the stock where no physical stock is kept in receiving plant
Dear All,
I am facing one issue. Suppose if there are two plants belongs to two company codes A & B.Plant A is in TN & Plant B is in AP (both belongs to two different states). Plant B is the place where no physical stock is kept, it is a place where JJ form & other documents are given to the vehicle to move it to other state. From there it ll move to end customer.
In plant A stock reduce-- inventory credit
COGS----Debit
In plant B stock increase=---Inventory debit
GR/IR--credit
Now my problem is in plant B no stock is kept, my client wants to reduce the inventory automatically without any manual entry (since no stock in plant B)
Can i use MB1A to reduce the stock automatically & what would be the actual entry for that. How to offset the other account which is getting debited against inventory?.
Regards
Subbu.Hi,
It seems to be a combined scenario of third party and inter company STO scenario, where you want to send the send the stock directly to your customer. Standard SAP doesnt support the third party scenario for a vendor assigned to the plant. The standard design is well explained in the note: 1918552 - Third Party Purchase in Cross Company STO: error 06769
If you dont want to update the stock in the receiving plant, use a consumption account assignment category (like K) in the intercompany STO, so that the stock will be directly consumed. But one question - how do you map the goods issue to the customer and the outgoing excise invoice? Could you please share the details.
Regards,
AKPT -
Dear all
i have createde a sto with 03 line items when i go for vl10b 02 items get populated in delivery but the system is not picking the third item it is saying
5500000010 000010 Only 0 NOS of material 410000010 available
5500000010 000010 An item with no delivery quantity is not permitted. Item will be deleted.
however material is in stock and is available on that particular date
while extending the material for the sto division i did n't selected the valuation type for this particular material is the problem has something to do with this
also when i am looking in the shipping tab in PO delivery creation date is showing for this particular material after creating delivery whereas for others its not showing
kindly helpHi,
Check on it:-
problem in STO delivery
STO Delivery problem with VL10B.
Re: STO Error In Delivery-Unexpected issue of error message ,messege No VR555
pherasath -
Dear Alll,
While issuing material against cross plant (same comp) STO, error comes " you are not authorised".
We give him authorisation in Object M_MSEG_WWA - Goods movement plant for activity 01 and Plant XXXX
But after giving him this authorisations he can do goods movement for that XXXX which he should not.
Can one tell me how to ressolve ..
Regards,
RakeshHello,
there has to be a check for the issuing and receiving plant
when posting the stock transfer (351)
(object M_MSEG_WWA, activity 01).
The only thing I could suggest is to modify standard authorization check in
SAPLMIGO/LMIGOKA1 METHOD LINE_ADD_AUTHORITY_CHECK.
I hope this helps!.
Best Regards,
Arminda -
hi
i have create STO (location to location in the same plant), and with the enought qty in stock by MMBE, however, when i create DN for this STO, error message is displayed. pls advice
8W356 - No stock available for stock transp.Christian,
It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.
Has your problem been resolved? If not, you might try one of the following options:
- Visit http://support.novell.com and search the knowledgebase and/or check all
the other self support options and support programs available.
- You could also try posting your message again. Make sure it is posted in the
correct newsgroup. (http://support.novell.com/forums)
Be sure to read the forum FAQ about what to expect in the way of responses:
http://support.novell.com/forums/faq_general.html
If this is a reply to a duplicate posting, please ignore and accept our apologies
and rest assured we will issue a stern reprimand to our posting bot.
Good luck!
Your Novell Product Support Forums Team
http://support.novell.com/forums/ -
Error in MIGO while doing Intracompnay plant to depot by STO
Dear gurus,
I am facing an error while posting MIGO during intra-company plant to plant STO.
Settings for STO:
SPRO >IMG > MM >Purchasing > Purchase Order>set up Stock Transport Order
Define Shipping Data
Define/assign Checking rule
Assign Delivery Type
Assign Doc type
I have maintained the following pre-requisite master data
1. Supplying/Receiving plants are created as customer/vendor master
2. Excise details (customer/Vendor/Plant) data are maintained in J1ID
3. Assessable value is entered in J1ID
Process flow:
1. ME21n - Create STO (PO type:UB)
2. VL10B - Create Outbound Delivery
3. VL02N - PGI
4. VF01 - Create Pro-forma Invoice (Stock Transfer Invoice)
5. J1IIN - Post Excise Invoice
at the receiving Plant
6. MIGO-Post Goods Receipt.
After entering the excise invoice and clicking on CHECK button in MIGO, the following errors are appearing
1. Excise Details are not maintained for Vendor .-Message no. 8I565
2. Maintain Vendor for the excise invoice -Message no. 4F185
3. Please check excise base for the item is zero ! -Message no. 4F121
Please reply your valuable suggestions.
Regards,
AnbuDear,
1. Excise Details are not maintained for Vendor .-Message no. 8I565
Kindly maintain Excise Indicator for Vendor in TCODE-J1ID
2. Maintain Vendor for the excise invoice -Message no. 4F185
Kindly maintain Excise Indicator for VENDOR in J1ID
3. Please check excise base for the item is zero ! -Message no. 4F121
As excise in calculated on Base amount for Item so need to maintain Pricing for item then only it will be able to calculate
or if u dont want to item not to be relevent for pricing then make Excise condition type as manual an maintain it manually .
Regards
AJIT K SINGH
HAPPY TO HELP U -
Error in MIGO durng intra-company stock transfer by STO
Dear gurus,
I am facing an error while posting MIGO during intra-company plant to plant STO.
Settings for STO:
SPRO >IMG > MM >Purchasing > Purchase Order>set up Stock Transport Order
Define Shipping Data
Define/assign Checking rule
Assign Delivery Type
Assign Doc type
I have maintained the following pre-requisite master data
1. Supplying/Receiving plants are created as customer/vendor master
2. Excise details (customer/Vendor/Plant) data are maintained in J1ID
3. Assessable value is entered in J1ID
Process flow:
1. ME21n - Create STO (PO type:UB)
2. VL10B - Create Outbound Delivery
3. VL02N - PGI
4. VF01 - Create Pro-forma Invoice (Stock Transfer Invoice)
5. J1IIN - Post Excise Invoice
at the receiving Plant
6. MIGO-Post Goods Receipt.
After entering the excise invoice and clicking on CHECK buttin in MIGO, the following errors are appearing
1. Excise Details are not maintained for Vendor .-Message no. 8I565
2. Maintain Vendor for the excise invoice -Message no. 4F185
3. Please check excise base for the item is zero ! -Message no. 4F121
Please reply your valuable suggestions.
Regards,
AnbuHi Anbu..
Post Migo without excise entry and try in J1IG to post the excise invoice.
In J1iG..enter material doc of GR ,Excise invoice no from Manufac plant,check own plant and
Click Details to get the excise values as in excise invoice.
Hope this works !!
Thanks
R.Kannan, -
STO mail : pdf attachment has an error 'file damage' when try to open it
Dear expert,
I need to send an e-mail to the vendor with the sto list as attachment at the email.
I managed to send email to external addresee and made the pdf attachment, BUT somehow when I open the attachment it has an error says "Adobe Reader could not open xx.pdf because it is either not a supported file type or because the file has been damaged(for axample, it was sent as an email attachment and wasn't corectly decoded)."
Really need your experties to help me. Here is my abap coding to send email and do the pdf attachment at the new ouptput type to send email.
TYPES: BEGIN OF lty_drad,
doknr TYPE drad-doknr,
END OF lty_drad,
BEGIN OF lty_recpt,
smtp_addr TYPE ad_smtpadr,
END OF lty_recpt.
DATA: lt_doc TYPE STANDARD TABLE OF docs,
lt_recpt TYPE STANDARD TABLE OF lty_recpt,
lt_tline LIKE tline OCCURS 0 WITH HEADER LINE,
lt_data TYPE solix_tab,
lt_docu TYPE STANDARD TABLE OF lty_drad,
lt_docfiles TYPE STANDARD TABLE OF bapi_doc_files2,
lw_tline LIKE LINE OF lt_tline,
lw_docu LIKE LINE OF lt_docu,
lw_docfiles LIKE LINE OF lt_docfiles,
lw_objdes TYPE tnati-objdes,
lt_text TYPE bcsy_text,
lw_recpt TYPE adr6-smtp_addr,
lw_adrnr TYPE lfa1-adrnr,
lw_object TYPE drad-objky,
lw_doknr TYPE drad-doknr,
lw_return TYPE bapiret2,
lw_xcontent TYPE xstring,
client TYPE REF TO if_http_client,
url TYPE string,
lw_subrc TYPE sysubrc,
response TYPE REF TO if_http_response,
lw_message1 TYPE string,
sent_to_all TYPE os_boolean,
bin_filesize type i.
CONSTANTS: lc_dokar_srm TYPE drad-dokar VALUE 'SRM',
lc_type TYPE so_obj_tp VALUE 'RAW'.
CLASS-DEFINITIONS
DATA: send_request TYPE REF TO cl_bcs.
DATA: document TYPE REF TO cl_document_bcs.
DATA: sender TYPE REF TO cl_sapuser_bcs.
DATA: recipient TYPE REF TO if_recipient_bcs.
DATA: exception_info TYPE REF TO if_os_exception_info,
bcs_exception TYPE REF TO cx_bcs.
RANGES: lr_po_pr FOR drad-objky.
DATA: lw_banfn TYPE ekpo-banfn,
lw_bnfpo TYPE ekpo-bnfpo.
IF nast-nacha = '5'. "8
Create recipient and check if exist
Get email ID
start commented by sapnislina 21.12.06
SELECT SINGLE adrnr FROM lfa1 INTO lw_adrnr
WHERE lifnr = p_ekko-lifnr.
IF sy-subrc NE 0.
PERFORM protocol_update
USING '303' 'Address of Vendor:' ekko-lifnr 'not found' space
p_retco = sy-subrc.
EXIT.
ENDIF.
end commented by sapnislina 21.12.06
SELECT smtp_addr INTO CORRESPONDING FIELDS OF TABLE lt_recpt
FROM adr6
WHERE addrnumber = p_ekko-adrnr. "lw_adrnr.
IF lt_recpt[] IS INITIAL.
PERFORM protocol_update
USING '303' 'Email address(es) does not exist for vendor'
p_ekko-lifnr space space.
p_retco = sy-subrc.
EXIT.
ENDIF.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
use_otf_mc_cmd = 'X'
IMPORTING
bin_filesize = bin_filesize
TABLES
otf = otfdata[]
doctab_archive = lt_doc
lines = lt_tline
EXCEPTIONS
err_conv_not_possible = 1
err_otf_mc_noendmarker = 2
OTHERS = 3.
IF sy-subrc <> 0.
PERFORM protocol_update
USING '303' 'PO Convertion from OTF to PDF failed'
space space space.
p_retco = sy-subrc.
EXIT.
ENDIF.
Get object description from mail title of output types
SELECT SINGLE objdes INTO lw_objdes
FROM tnati
WHERE spras = sy-langu
AND kappl = nast-kappl
AND kschl = nast-kschl.
CONCATENATE lw_objdes ekko-ebeln INTO lw_objdes SEPARATED BY
space
DATA L_TXT(255) TYPE C.
DATA L_TXT2(255) TYPE C.
CONCATENATE 'STO' EKPO-EBELN 'Created for' EKPO-WERKS '/'
EKPO-LGORT
'Supply Plant' EKKO-RESWK into l_txt separated by space.
lw_objdes = l_txt.
CONCATENATE 'STO' EKKO-EBELN INTO L_TXT2 SEPARATED BY SPACE.
APPEND L_TXT2 TO LT_TEXT.
APPEND lw_objdes TO lt_text.
Instantiate
CLASS cl_cam_address_bcs DEFINITION LOAD.
CLASS cl_abap_char_utilities DEFINITION LOAD.
insert by sapnislina 22.12.06
DATA : CONTENT_OUT TYPE SOLIX,
LINE_WIDTH_SRC TYPE I,
POS_OUT TYPE I,
POS_IN TYPE I,
LEN_OUT TYPE I.
DATA OBJBIN LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
DATA : BEGIN OF CONTENT_IN,
LINE TYPE TLINE,
DUMMY TYPE TLINE,
END OF CONTENT_IN.
TYPES PDF_RAW TYPE X LENGTH 268.
FIELD-SYMBOLS <PDF_BIN> TYPE PDF_RAW.
DESCRIBE FIELD CONTENT_IN-LINE LENGTH LINE_WIDTH_SRC IN BYTE MODE.
REFRESH lt_data.
CLEAR CONTENT_OUT.
POS_OUT = 0.
LOOP AT OTFDATA INTO CONTENT_IN-LINE.
ASSIGN CONTENT_IN TO <PDF_BIN> CASTING.
MOVE <PDF_BIN> TO CONTENT_OUT-LINE+POS_OUT.
ADD LINE_WIDTH_SRC TO POS_OUT.
WHILE POS_OUT >= 255.
APPEND CONTENT_OUT TO lt_data.
CLEAR CONTENT_OUT.
SUBTRACT 255 FROM POS_OUT.
IF POS_OUT > 0.
POS_IN = LINE_WIDTH_SRC - POS_OUT.
MOVE <PDF_BIN>+POS_IN TO CONTENT_OUT-LINE.
ENDIF.
ENDWHILE.
ENDLOOP.
IF POS_OUT > 0.
APPEND CONTENT_OUT TO lt_data.
ENDIF.
end inserted by sapnislina 22.12.06
starting to create attachment to mail
TRY.
CLEAR send_request .
Create persistent send request
send_request = cl_bcs=>create_persistent( ).
Build the document
document = cl_document_bcs=>create_document(
i_type = lc_type "RAW
i_text = lt_text "def of output type
i_length = '12'
i_subject = lw_objdes ).
Attached the document object
CALL METHOD document->add_attachment
EXPORTING
i_attachment_type = 'PDF'
i_attachment_subject = lw_objdes "definition of output
type
i_attachment_size = '12'
i_att_content_hex = lt_data.
completed first part to attached PO (pdf format) as attachment
Now attach the PO related attachments to the mail..
.... need to read from table DRAD and get all the attachment per PO
at run time
REFRESH: lr_po_pr."lt_return.
CLEAR: lr_po_pr,lw_return.
MOVE 'ICP' TO lr_po_pr.
CLEAR: lw_object.
completed second part for PO related attachments
Now prepare to send mail
Add document to send request
CALL METHOD send_request->set_document( document ).
Get sender object
sender = cl_sapuser_bcs=>create( sy-uname ).
Add sender
CALL METHOD send_request->set_sender
EXPORTING
i_sender = sender.
LOOP AT lt_recpt INTO lw_recpt
WHERE NOT smtp_addr IS INITIAL.
recipient = cl_cam_address_bcs=>create_internet_address(
lw_recpt ).
Add recipient with its respective attributes to send request
CALL METHOD send_request->add_recipient
EXPORTING
i_recipient = recipient
i_express = 'X'.
CLEAR recipient.
ENDLOOP.
Send the document
CALL METHOD send_request->send
RECEIVING
result = sent_to_all.
Catch any exception
CATCH cx_bcs INTO bcs_exception.
CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
EXPORTING
msg_arbgb = bcs_exception->msgid
msg_nr = bcs_exception->msgno
msg_ty = bcs_exception->msgty
msg_v1 = bcs_exception->msgv1
msg_v2 = bcs_exception->msgv2
msg_v3 = bcs_exception->msgv3
msg_v4 = bcs_exception->msgv4
EXCEPTIONS
OTHERS = 1.
p_retco = sy-subrc.
ENDTRY.
ENDIF.
IF NOT result-tdfaxid IS INITIAL OR " 422131
NOT result-tdmailid IS INITIAL. " 422131
CLEAR syst-msgv1. " 422131
IF NOT result-tdfaxid IS INITIAL. " 422131
syst-msgv1 = result-tdfaxid. " 422131
ELSEIF result-tdmailid IS INITIAL. " 422131
syst-msgv1 = result-tdmailid. " 422131
ENDIF. " 422131
CALL FUNCTION 'NAST_PROTOCOL_UPDATE' " 422131
EXPORTING " 422131
msg_arbgb = 'VN' " 422131
msg_nr = '095' " 422131
msg_ty = 'I' " 422131
msg_v1 = syst-msgv1 " 422131
EXCEPTIONS " 422131
OTHERS = 1. " 422131
ENDIF. " 422131
IF result-userexit EQ 'C' OR
result-userexit EQ 'E'.
p_retco = '9'.
ENDIF.
ENDFORM. " ENDE
end inserted
Regards
NislinaHi Nislina,
Could you please let me know how do you solve this issue.
Code:
if lt_binary[] is not initial.
* add attachment to document
call method document->add_attachment
exporting
i_attachment_type = 'PDF'
i_attachment_subject = 'My Attachment'
i_att_content_hex = lt_binary.
endif.
Thanks & Regard's
Sateesh
Maybe you are looking for
-
How do I install acrobat on a different drive?
I does not give me the option to install it on a drive other than my C drive. I tried the steps in a previous post, but i could still not find the option to change the drive before installation.
-
Hi, Anyone know how to make the error message '20002953 is already a follow-up material in plant 1000' from error message to just warning? I try to search in SPRO and seem cant to find it a way. Hope that any expert out there can give me a solution.
-
Adding a sub-total column in a report
I making changes to a developed report using Reports 2.5 and I need to add a subtotal column at the change of wbs code.in other words I have A26,A27,A28. At the end of A26, I would like to have subtotal column, and then when I get to A27, another sub
-
Input Help for TIME type field
I saw below discussion regarding a dropdown for a "TIME" type field. Re: Time Search Help It's a resuable component (that Thomas Jung created) and find it very slick. I just couldn't make it to work. I'm getting a dump when I pressed the dropdown on
-
When I synch my phone with Outlook, all the appointments in my phone are one hour later. My phone clock has the correct time and my system clock on my desktop has the correct time. Any suggestions?