R12 Generate Customer Statement and email to customer automatically.
Hi,
Is there any standard function "Generating Customer Statement and emailing directly to customer" in R12?
Thanks
Dharma
Not that I am aware of - see MOS Doc 433215.1 (Is There a Way to Email AR Statements or Dunning Letters to Customers?)
Srini
Similar Messages
-
HI,
I have config the Customer statement by means of correnpondence & it working fine.
But I need to send it through email maintained in customer master when i run f.27 mails should be send automatically.
For doing this do we need to do any config required or do we need to direaclty write it in the program code it self.
Regards
RaviI have the same requirement to email from f.27 customer statement automatically
what logic did you put to solved, can you explain me please
There are two problems which is controlling F.27. IT have created Z PROGRAM to control the printing and email the customer
ZFIO_ACCOUNT_STATEMENT_EMAIL -> program
ZWAG_COMMON_ROUTINE - > Include
ZWAG_SAPSCRIPT_ROUTINES_EM -> Include
ZEMAIL_SEND -> Include added for email .
The program is running fine but I have to type email id and spool number which I don't want. The program should search customer automatically based on email address from XD02 ( Customer ) .
*& Include ZEMAIL_SEND *
*ZEMAIL_SEND.
*& Form setup_output_parameters
* text
*& Include
* Purpose:
* Provide generic subroutines for any ABAP programs with intention of
* sending email (SAPOffice or Internet) with attachments
* This report provides an example for sending an Spool
* request as PDF via BCS
parameters:
mailto type ad_smtpadr default '[email protected]' obligatory,
rqident type tsp01-rqident obligatory.
DATA:v_adrnr LIKE kna1-adrnr.
" Mail related declarations
"Variables
DATA :
G_SENT_TO_ALL TYPE SONV-FLAG,
G_TAB_LINES TYPE I.
"Types
TYPES:
T_DOCUMENT_DATA TYPE SODOCCHGI1,
T_PACKING_LIST TYPE SOPCKLSTI1,
T_ATTACHMENT TYPE SOLISTI1,
T_BODY_MSG TYPE SOLISTI1,
T_RECEIVERS TYPE SOMLRECI1,
T_PDF TYPE TLINE.
"Workareas
DATA :
W_DOCUMENT_DATA TYPE T_DOCUMENT_DATA,
W_PACKING_LIST TYPE T_PACKING_LIST,
W_ATTACHMENT TYPE T_ATTACHMENT,
W_BODY_MSG TYPE T_BODY_MSG,
W_RECEIVERS TYPE T_RECEIVERS,
W_PDF TYPE T_PDF.
"Internal Tables
DATA :
I_DOCUMENT_DATA TYPE STANDARD TABLE OF T_DOCUMENT_DATA,
I_PACKING_LIST TYPE STANDARD TABLE OF T_PACKING_LIST,
I_ATTACHMENT TYPE STANDARD TABLE OF T_ATTACHMENT,
I_BODY_MSG TYPE STANDARD TABLE OF T_BODY_MSG,
I_RECEIVERS TYPE STANDARD TABLE OF T_RECEIVERS,
I_PDF TYPE STANDARD TABLE OF T_PDF.
data send_request type ref to cl_bcs.
data document type ref to cl_document_bcs.
data recipient type ref to if_recipient_bcs.
data bcs_exception type ref to cx_bcs.
data sent_to_all type os_boolean.
data pdf_size type so_obj_len.
data pdf_content type solix_tab.
data pdf_xstring type xstring.
DATA: TAB_LINES LIKE SY-TABIX.
*Variables for EMAIL functionality
DATA: MAILDATA LIKE SODOCCHGI1.
DATA: MAILPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
DATA: MAILHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
DATA: MAILBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: MAILTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: MAILREC LIKE SOMLREC90 OCCURS 0 WITH HEADER LINE.
DATA: SOLISTI1 LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
start-of-selection.
perform create_pdf.
perform send.
* perform get_otf_code. " piroz
*& Form send
form send.
try.
* -------- create persistent send request ------------------------
send_request = cl_bcs=>create_persistent( ).
* -------- create and set document -------------------------------
pdf_content = cl_bcs_convert=>xstring_to_solix( pdf_xstring ).
document = cl_document_bcs=>create_document(
i_type = 'PDF'
i_hex = pdf_content
i_length = pdf_size
i_subject = 'Accounting statement' ). "#EC NOTEXT
* add document object to send request
send_request->set_document( document ).
* --------- add recipient (e-mail address) -----------------------
* create recipient object
recipient = cl_cam_address_bcs=>create_internet_address( mailto ).
* add recipient object to send request
send_request->add_recipient( recipient ).
* ---------- send document ---------------------------------------
sent_to_all = send_request->send( i_with_error_screen = 'X' ).
commit work.
if sent_to_all is initial.
message i500(sbcoms) with mailto.
else.
message s022(so).
endif.
* ------------ exception handling ----------------------------------
* replace this rudimentary exception handling with your own one !!!
catch cx_bcs into bcs_exception.
message i865(so) with bcs_exception->error_type.
endtry.
endform. "send
*& Form create_pdf
* Create PDF Content
* 1) get attributes of spool request
* 2) convert spool request to PDF dependent on document type
form create_pdf.
data rq type tsp01.
data bin_size type i.
data dummy type table of rspoattr.
* ------------ get attributes of spool request ---------------------
call function 'RSPO_GET_ATTRIBUTES_SPOOLJOB'
exporting
rqident = rqident
importing
rq = rq
tables
attributes = dummy
exceptions
no_such_job = 1
others = 2.
if sy-subrc <> 0.
message e126(po) with rqident.
endif.
* TYPE-POOLS szadr.
* DATA: l_addr1_complete TYPE szadr_addr1_complete,
* l_adsmtp_line TYPE szadr_adsmtp_line,
* ld_intad type knb1-intad.
** default: print payment advice
* c_finaa-nacha = '1'.
** Read mail address of vendor from knb1.customer no is available in kna1 payment data structure
* clear ld_intad.
* IF NOT i_knb1-kunnr IS INITIAL and
* not i_knb1-zbukrs is initial.
* SELECT SINGLE intad
* INTO ld_intad
* FROM knb1
* WHERE kunnr = i_knb1-kunnr
* AND bukrs = i_knb1-zbukrs.
* IF NOT ld_intad IS INITIAL.
* c_finaa-nacha = 'I'.
* c_finaa-intad = ld_intad.
* ENDIF.
* ENDIF.
** check that address number is available
* IF NOT i_kna1-zadnr IS INITIAL.
** read complete address of vendor/customer
* CALL FUNCTION 'ADDR_GET_COMPLETE'
* EXPORTING
* addrnumber = i_kna1-zadnr
* IMPORTING
* addr1_complete = l_addr1_complete
* EXCEPTIONS
* OTHERS = 4.
* IF sy-subrc EQ 0.
* READ TABLE l_addr1_complete-id_intad "Insert ECDK900445
* INTO l_adsmtp_line "Insert ECDK900445
* WITH KEY adsmtp-flgdefault = 'X'. "Insert ECDK900445
* IF sy-subrc EQ 0
* AND NOT l_adsmtp_line-id_intad IS INITIAL.
** choose message type 'I'nternet and fill email address
* c_finaa-nacha = 'I'.
* c_finaa-intad = ld_intad.
* ENDIF.
* ENDIF.
* ENDIF.
*ENDFUNCTION.
* select SINGLE adrnr from kna1 from adr6
* into table internal table where
* kna1-kunnr eq = it_kna1-kunnr.
** select email ids from adr6
* select addrnumber smtp_addr from adr6 INTO table it_adr6
* where addrnumber = v_adrnr.
* LOOP AT it_adr6 INTO wa_adr6.
* i_reclist-receiver = wa_adr6-smtp_addr.
* i_reclist-rec_type = 'U'.
* i_reclist-com_type = 'INT'.
* i_reclist-notif_del = 'X'.
* i_reclist-notif_ndel = 'X'.
* i_reclist-notif_read = 'X'.
* i_reclist-express = 'X'.
* APPEND i_reclist.
* CLEAR: i_reclist, wa_adr6-smtp_addr.
* ENDLOOP.
*in function module 'SO_NEW_DOCUMENT_ATT_SEND_API1' field receivers = i_reclist.
*CALL FUNCTION 'ZCUSTOMER_MAIL_00002310' "
* EXPORTING
* i_bkorm = bkorm
* i_koart = bkorm-koart
* i_kna1 = kna1
* i_knb1 = knb1
** i_lfa1 = lfa1
** i_lfb1 = lfb1
* TABLES
* t_fimsg = fimsg
* CHANGING
* c_finaa = finaa
* c_itcpo = itcpo
** c_archive_index = SPACE " toa_dara
** c_archive_params = SPACE " arc_params . " ZCUSTOMER_MAIL_00002310
*Function module to send mail to Recipients
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = W_DOCUMENT_DATA
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
IMPORTING
SENT_TO_ALL = G_SENT_TO_ALL
TABLES
PACKING_LIST = I_PACKING_LIST
CONTENTS_BIN = I_ATTACHMENT
CONTENTS_TXT = I_BODY_MSG
RECEIVERS = I_RECEIVERS
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8.
IF SY-SUBRC = 0 .
MESSAGE I303(ME) WITH 'Mail has been Successfully Sent.'.
ELSE.
WAIT UP TO 2 SECONDS.
"This program starts the SAPconnect send process.
SUBMIT RSCONN01 WITH MODE = 'INT'
WITH OUTPUT = 'X'
AND RETURN.
ENDIF.
* --- convert spool request into PDF, dependent on document type ---
if rq-rqdoctype = 'OTF' or rq-rqdoctype = 'SMART'.
call function 'CONVERT_OTFSPOOLJOB_2_PDF'
exporting
src_spoolid = rqident
no_dialog = 'X'
pdf_destination = 'X'
no_background = 'X'
importing
pdf_bytecount = bin_size
bin_file = pdf_xstring
exceptions
err_no_otf_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_dstdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
others = 12.
if sy-subrc <> 0.
message e712(po) with sy-subrc 'CONVERT_OTFSPOOLJOB_2_PDF'.
endif.
elseif rq-rqdoctype = 'LIST'.
call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
exporting
src_spoolid = rqident
no_dialog = 'X'
pdf_destination = 'X'
no_background = 'X'
importing
pdf_bytecount = bin_size
bin_file = pdf_xstring
exceptions
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
others = 12.
if sy-subrc <> 0.
message e712(po) with sy-subrc 'CONVERT_ABAPSPOOLJOB_2_PDF'.
endif.
else.
message e789(po) with rq-rqdoctype.
endif.
pdf_size = bin_size.
endform. "create_pdf
* FORM OUTPUT_OPENFI *
FORM OUTPUT_OPENFI.
DATA: T_FIMSG LIKE FIMSG OCCURS 10 WITH HEADER LINE.
CALL FUNCTION 'OPEN_FI_PERFORM_00002310_P'
EXPORTING
I_BKORM = BKORM
I_KOART = C_KOART
I_KNA1 = KNA1
I_KNB1 = KNB1
* I_LFA1 = LFA1
* I_LFB1 = LFB1
TABLES
T_FIMSG = T_FIMSG
CHANGING
C_FINAA = ST_FINAA
C_ITCPO = ST_ITCPO.
* C_ARCHIVE_INDEX = H_ARCHIVE_INDEX
* C_ARCHIVE_PARAMS = H_ARCHIVE_PARAMS.
LOOP AT T_FIMSG.
CALL FUNCTION 'FI_MESSAGE_COLLECT'
EXPORTING
I_FIMSG = T_FIMSG
I_XAPPN = 'X'
EXCEPTIONS
MSGID_MISSING = 1
MSGNO_MISSING = 2
MSGTY_MISSING = 3
OTHERS = 4.
ENDLOOP.
ENDFORM.
Form GET_OTF_CODE.
DATA: BEGIN OF OTF OCCURS 0.
INCLUDE STRUCTURE ITCOO .
DATA: END OF OTF.
DATA: ITCPO LIKE ITCPO.
DATA: ITCPP LIKE ITCPP.
CLEAR ITCPO.
ITCPO-TDGETOTF = 'X'.
* Start writing OTF code
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = 'Z140_ACC_STAT_01'
LANGUAGE = SY-LANGU
OPTIONS = ITCPO
DIALOG = ' '
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'START_FORM'
EXCEPTIONS
ERROR_MESSAGE = 01
OTHERS = 02.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
WINDOW = 'MAIN'
EXCEPTIONS
ERROR_MESSAGE = 01
OTHERS = 02.
* Close up Form and get OTF code
CALL FUNCTION 'END_FORM'
EXCEPTIONS
ERROR_MESSAGE = 01
OTHERS = 02.
MOVE-CORRESPONDING ITCPO TO ITCPP.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = ITCPP
TABLES
OTFDATA = OTF
EXCEPTIONS
OTHERS = 1.
* Move OTF code to structure SOLI form email
CLEAR SOLISTI1.
REFRESH SOLISTI1.
LOOP AT OTF.
SOLISTI1-LINE = OTF.
APPEND SOLISTI1.
ENDLOOP.
ENDFORM. "GET_OTF_CODE
SAP recommends to use BTE 2013 and added the coding for email.
CREATED: ZCUSTOMER_MAIL_00002310
TABLES: KNA1, "Kunden A-Segment
KNB1, "Kunden B-Segment
LFA1, "Lieferanten A-Segment
LFB1, "Lieferanten B-Segment
BKORM, "Korrespondenzanforderungen
FINAA. "Daten zum Sendemedium
DATA: SAVE_KOART LIKE BKORM-KOART, "Hilfsfeld Kontoart
SAVE_LAND1 LIKE KNA1-LAND1, "Hilfsfeld Faxanschluß
SAVE_TELFX LIKE KNA1-TELFX, "Hilfsfeld Faxanschluß
SAVE_ZSABE LIKE KNB1-ZSABE, "Hilfsfeld Faxanschluß
SAVE_INTAD LIKE KNB1-INTAD. "Hilfsfeld Internet
KNA1 = I_KNA1.
LFA1 = I_LFA1.
KNB1 = I_KNB1.
LFB1 = I_LFB1.
BKORM = I_BKORM.
SAVE_KOART = I_KOART.
CLEAR: SAVE_LAND1,
SAVE_TELFX,
SAVE_ZSABE.
IF SAVE_KOART = 'D'.
SAVE_LAND1 = KNA1-LAND1.
SAVE_TELFX = KNB1-TLFXS.
SAVE_ZSABE = KNB1-ZSABE.
SAVE_INTAD = KNB1-INTAD.
ELSE.
SAVE_LAND1 = LFA1-LAND1.
SAVE_TELFX = LFB1-TLFXS.
SAVE_ZSABE = LFB1-ZSABE.
SAVE_INTAD = LFB1-INTAD.
ENDIF.
IF SAVE_INTAD NE SPACE.
FINAA-NACHA = 'I'. "Ausgabe über Internet
FINAA-INTAD = SAVE_INTAD.
FINAA-TEXTF = 'PDF'.
ELSEIF SAVE_TELFX NE SPACE.
FINAA-NACHA = '2'. "Ausgabe auf Fax
FINAA-TDSCHEDULE = 'IMM'.
FINAA-TDTELELAND = SAVE_LAND1.
FINAA-TDTELENUM = SAVE_TELFX.
FINAA-TDFAXUSER = SPACE.
FINAA-NAMEP = SAVE_ZSABE.
FINAA-FORMC = 'FI_FAX_COVER_A4'.
FINAA-FORNR = SPACE.
ELSE.
FINAA-NACHA = '1'. "Drucken
ENDIF.
* Daten zum Sendemedium merken für Aufrufer
C_FINAA = FINAA.
ENDFUNCTION.
______________________________________ OR _________________________________________
To get the email id from the customer file.
TYPE-POOLS szadr.
DATA: l_addr1_complete TYPE szadr_addr1_complete,
l_adsmtp_line TYPE szadr_adsmtp_line,
ld_smtp_addr type adr6-smtp_addr.
* default: print payment advice
c_finaa-nacha = '1'.
* Read mail address of customer from knb1-kunnr no is available
clear ld_smtp_addr
IF NOT i_kna1-kunnr IS INITIAL and
not i_adr6-smtp_addr is initial.
SELECT SINGLE smtp_addr
INTO ld_smtp_addr
FROM kna1
where kna1-adrnr = adr6-addrnumber.
IF NOT ld_smtp_addr IS INITIAL.
c_finaa-nacha = 'I'.
c_finaa-intad = ld_smtp_addr.
ENDIF.
ENDIF.
* IF sy-subrc = 0.
** choose message type 'I'nternet and fill email address
* c_finaa-nacha = 'I'.
* ENDIF.
* ENDIF.
* check that address number is available
IF NOT i_kna1-zadnr IS INITIAL.
* read complete address of vendor/customer
CALL FUNCTION 'ADDR_GET_COMPLETE'
EXPORTING
addrnumber = i_kna1-zadnrada
IMPORTING
addr1_complete = l_addr1_complete
EXCEPTIONS
OTHERS = 4.
IF sy-subrc EQ 0.
* check that internet address is available
* READ TABLE l_addr1_complete-adsmtp_tab INTO l_adsmtp_line INDEX 1. "Delete ECDK900445
READ TABLE l_addr1_complete-adsmtp_tab "Insert ECDK900445
INTO l_adsmtp_line "Insert ECDK900445
WITH KEY adsmtp-flgdefault = 'X'. "Insert ECDK900445
IF sy-subrc EQ 0
AND NOT l_adsmtp_line-adsmtp-smtp_addr IS INITIAL.
* choose message type 'I'nternet and fill email address
c_finaa-nacha = 'I'.
c_finaa-intad = ld_smtp_addr.
ENDIF.
ENDIF.
ENDIF.
ENDFUNCTION.
( No output is going to the customer email address for the below steps )
1. Generate spool requst ..
2. Close_FORM ...will get the spool request
3. RSPO_RETURN_SPOOLJOB will convet spool to OTF data
4. Convet OTF data into PDF and send to mail.
Try all sorts of programming testing with the coding but no result in SOST ( to send email it is asking to enter the email id , when the email is enter going the customer which is not correct as there are bunches of account with different email address )
Regards
Piroz
Message was edited by: Piroz Eslam -
How to send multiple customer statements by email using RFKORD11 program.
Hi All,
How to send multiple customer statements by email using RFKORD11 program. Is it possible?
As of now we copied the stanadard program and sending the customer statements by email, one by one.
if i execute the z program it will show the customer statement and send mail option.
if i click send mail it will send that customer statement to the corresponding customer.
then again i need to click back, it will show next customer statement and click on send mail.
Pl guide me, if any one worked on this program.
thanks in advance.
Regards,
MaheshTry execute the program in the background to see if that helps.
-
How to send multiple customer statements by email using RFKORD11
Hi All,
How to send multiple customer statements by email using RFKORD11 program.
As of now we copied the stanadard program and sending the customer statements by email, one by one.
if i execute the z program it will show the customer statement and send mail option.
if i click send mail it will send that customer statement to the corresponding customer.
then again i need to click back, it will show next customer statement and click on send mail.
Pl guide me, if any one worked on this program.
Regards,
MaheshHi .
You first need to copy that program to Z and make the changes in it. Can you convert sapscript to smartform?
then you can write a logic to send mail in the loop.
to send the pdf file
https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/mailsendthroughoutputcontrols
Regards,
Madhuri
Edited by: madhuri sonawane on Jun 10, 2009 4:20 PM -
Binding a subtree using custom State- and ObjectFactory
Hi,
first of all a very short example to illustrate my idea. I know that it would be complete rubbish to store the kind of data in the example in multiple classes and ldap entries. Currently I'm working with much larger objects that must be written according to special schema definitions. This example is really only for illustration!
LDAP-Schema:
objectclass ( 1.3.6.1.4.1... NAME 'myperson'
SUP top STRUCTURAL
MUST ( cn $ sn ) MAY ( email ) )
objectclass ( 1.3.6.1.4.1... NAME 'myphoto'
SUP top STRUCTURAL
MUST ( cn $ jpegPhoto ) )
Java-Classes:
class MyPhoto {
byte[] photo;
class MyPerson {
String cn;
String sn;
String email;
MyPhoto photo; // This is the really relevant line :)
}Now to the question:
Is it possible to bind multiple java objects with one call to bind and to get a subtree by using custom State- and ObjectFactory-Classes?
Structure of the LDAP-Database
dn: cn=John Doe
{ cn=John Doe
sn=Doe
[email protected] }
dn: cn=TheLogo, cn=John Doe // Child of cn=John Doe
{ cn=TheLogo // The cn is the same for all MyPhoto entries
// its only use is for building the dn
jpegPhoto=[some binary data] }I tried to solve the problem with a kind of recursion. When my StateFactory is called to bind an Object of Class MyPerson it builds the appropriate AttributeList. Before it returns, it calls bind for the Object of class MyPhoto with the dn: "cn=TheLogo,cn=John Doe".
Of course this doesn't work because the entry for cn="John Doe" doesn't exist at this time. Now I don't know what to do. A possible solution would be to create everything by hand, but then I wouldn't have to use custom StateFactories at all. But if there is a simple solution to my problem I would like to use my own StateFactory instead of having to implement a persistance manager on my own.
I hope you understand what I want to do and why it doesn't work out. If you don't please ask and I will try to clarify.Hello,
A provisional solution is to use an external controller. For this approach to work, each class has to provide the list of objects being part of its properties. I have prepared two interfaces for this purpose:
public interface HasSubordinates {
Enumeration getSubordinates();
boolean hasSubordinates();
public interface Storable extends HasSubordinates {
String getIdentifier();
Then, you can use the controller to recursively get the object "tree" and store it in the directory (either using objects that implement the DirContext interface or using StateFactories - the last one is the one I have used)
The code for the Controller is the following:
import javax.naming.*;
import javax.naming.directory.*;
import javax.naming.spi.*;
import java.util.*;
import java.io.IOException;
public class DatabaseAccessController {
// Constants
final static String ldapServerName = "localhost";
final static String rootdn = "cn=juanluis, o=niaf";
final static String rootpass = "secret";
final static String rootContext = "o=niaf";
private DirContext initialContext;
private static Properties env = new Properties();
static {
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
env.put( Context.STATE_FACTORIES, "database.PersonStateFactory:database.AddressStateFactory");
env.put( Context.PROVIDER_URL, "ldap://"+ ldapServerName+"/"+rootContext);
env.put( Context.SECURITY_PRINCIPAL, rootdn );
env.put( Context.SECURITY_CREDENTIALS, rootpass );
public DatabaseAccessController() {
try {
initialContext = new InitialDirContext( env );
} catch( Exception e ) {
e.printStackTrace();
public void store( Storable object ) {
try {
store( object, initialContext );
} catch( NamingException ne ) {
ne.printStackTrace();
private void store( Storable object, DirContext ctx ) throws NamingException{
DirStateFactory.Result result = DirectoryManager.getStateToBind( object, null, null, env, null );
Attributes attributes = result.getAttributes();
DirContext new_ctx = ctx.createSubcontext( dn(object), attributes );
if( object.hasSubordinates() ) {
Enumeration subordinates = object.getSubordinates();
while( subordinates.hasMoreElements() ) {
try {
store( (Storable)subordinates.nextElement(), new_ctx );
} catch( Exception e ) {
e.printStackTrace();
private String dn( Storable object ) {
return "cn="+object.getIdentifier();
This is an example of how it should work on two objects:
public class Person implements Storable{
String name;
String surname;
Address address;
public Person(String n, String sn, Address addr) {
name = n;
surname = sn;
address = addr;
public boolean hasSubordinates() {
return true;
public Enumeration getSubordinates() {
Hashtable h = new Hashtable();
h.put("address", address );
return h.elements();
public String getIdentifier() {
return name + " "+ surname;
public class Address implements Storable {
String street;
int number;
Attributes attrs;
public Address( String s, int n) {
street = s;
number = n;
public boolean hasSubordinates() {
return false;
public Enumeration getSubordinates() {
return null;
public String getIdentifier() {
return street + number;
And here it is the program that access to the directory:
public class TestLDAP {
public TestLDAP() {
public static void main(String[] args) {
try {
System.out.println("Creating controller...");
DatabaseAccessController controller = new DatabaseAccessController();
System.out.println("Controller created");
Person person = new Person("Juan Luis", "Manas", new Address("Street in Madrid", 33 ));
System.out.println("Storing object in the directory...");
controller.store(person);
System.out.println("object stored successfully!");
} catch( Exception e ) {
e.printStackTrace();
}���
If you find a better way of performing the storage of complex objects in the directory, please, let me know.
Regards,
Juan Luis -
What is a customer statement and when do we use it?
Hi,
What is a customer statement and when do we use it? An example in terms of business scenario would surely help me.Hi,
In business sense Customer statment is the list of transactions that were executed over a period of time.
When ever customer buys the material from the company bill is generated and the same is debited to his account.
whenever customer pays the amount to the company, the amount will be credited to his account.
So the Customer statment will have the list of DEBIT and CREDIT entries.
There will be Reconciliation for every quarter with the customer by the company sales executive and related price, discounts, freight which might be excess or less will be settled -
Customer Statements and Correspondence
Hello-
We have couple of correspondence types created for our customer statements and invoices. We use program "RFKORD10" and have some sap scripts designed to print out customer statements.
We were on 4.7 SP 24 and recently have applied supprot packs till 31. With the applicaiton of SP's two notes were applied to this program "RFK0RD10" which are 999507 and 854148.
Our statements now printing way different and incorrect. We looked at the sap scripts and nothing changed. Looked at the program and these are the two changes. What else would be the problem?
Did anyone face this issue?
Thanks in advance.
RNarayanHello,
Check if notes 1243485 and 1100728 are applied. If not, implement them.
They should fix this.
Regards, -
ERROR: Your web form must capture customer name and email address.
Hi,
I keep receiving this error message when trying to checkout and submit a payment.
ERROR: An error occurred. Your web form must capture customer name and email address. Please fix this issue and re-insert your web form on your web page.
The strange thing is it's only happening in chrome. It works perfectly in IE and firefox, the form submits and takes me to the order confirmation page. I've tested it on multiple PCs so it's definitely a chrome issue. Does anyone have any advice as to what could be causing this issue with chrome?
Thanks,
PeteCheck your eCommerce web form in the admin has the ID - 211729
This is what the form ID is, if you have deleted it and made a new one it will not Marry up
The things you normally look for with this error is The first name and last name along with email fields have the right ID and name parameters on the input. The javascript is picking those up so it looks like that is working.
So next is the form in the admin marrying up with the form on the page or in this case the Registration Buy layout. -
Need to Update Customer Address and Email Adress in AR
Hi ,
I am new to AR.
I need to update Customer name and Email Address in AR. Can you please provide me if there is any API or Interface Exist.
Also please provide me the steps and the maditory values which we need to provide during the updation.
Regards
Suresh PCheck irep.oracle.com to find out about all available APIs
Also check
Oracle Integration Repository Documentation Resources Release 12 (Doc ID 396116.1)
IREP - Oracle Integration Repository: The Tool To Find Which API Is Supported and How To Use It ... (Doc ID 554986.1)
Hope this answers your question,
Sandeep Gandhi -
How do i fix the "web form must capture customer name and email address" error?
Hi all,
I have a webform that is submitting securely to the bc servers. I get the response:
{"SystemMessage": { "success": False, "message": "ERROR: An error occurred. Your web form must capture customer name and email address. Please fix this issue and re-insert your web form on your web page." }}
I have verified that the "FirstName","LastName","EmailAddress" are actually gettting sent with their corresponding values. I can't seem to figure out why i keep getting this error. Can someone please lend a helping hand?!? Thanks guys... here's my code:
var rAction = 'https://site.worldsecuresystems.com/FormProcessv2.aspx?WebFormID=85886&OID={module_oid}&OTYPE={module_otype}&EID={module_eid}&CID={module_cid}&CC={module_urlcountryc ode}&Referrer={module_siteurl,true,true}&JSON=1';
var rData = 'FirstName='+escape(fName.val())+'&LastName='+escape(lName.val())+'&EmailAddress='+escape (email.val())+'&Username='+escape(username.val())+'&Password='+escape(passwd.val())+'&Pass wordConfirm='+escape(passwd2.val())+'&BillingAddress='+escape(baddress.val())+'&BillingCit y='+escape(bcity.val())+'&BillingState='+escape(bstate.val())+'&BillingZip='+escape(bzip.v al())+'&PaymentMethodType='+escape(paymentMethodType)+'&CardName='+escape(cName.val())+'&C ardNumber='+escape(cNum.val())+'&CardExpiryMonth='+escape(expMonth)+'&CardExpiryYear='+esc ape(expYear)+'&CardType='+escape(cType)+'&CardCCV='+escape(ccv.val())
$.ajax({
type: 'POST',
url: rAction,
data: rData,
success: function(msg){
console.log('success');
$('#result').html(msg);
error: function(msg){
console.log('error');
$('#result').html(msg);Ok -- after testing this out a little on my own I think it must have to do with not properly serialzing the data you are passing in the ajax function. In the example I linked to earlier they are just serialzing the form data and it works because it converts the data in the form's input fields to URL encoded notation.
If you aren't using an actual form on your site to mimick the example I linked to then when building your "rData" string instead of using the "escape" function for each of the parameter values, you should be using the "encodeURIComponent" function instead which instead of escaping characters will convert it to URL encoded notation. That's probably your issue. Here's more about encodeURIComponent(): http://www.w3schools.com/jsref/jsref_encodeURIComponent.asp
Try this with the rData variable instead:
var rData = 'FirstName='+encodeURIComponent(fName.val())+'&LastName='+encodeURIComponent(lName.val()) +'&EmailAddress='+encodeURIComponent(email.val())+'&Username='+encodeURIComponent(username .val())+'&Password='+encodeURIComponent(passwd.val())+'&PasswordConfirm='+encodeURICompone nt(passwd2.val())+'&BillingAddress='+encodeURIComponent(baddress.val())+'&BillingCity='+en codeURIComponent(bcity.val())+'&BillingState='+encodeURIComponent(bstate.val())+'&BillingZ ip='+encodeURIComponent(bzip.val())+'&PaymentMethodType='+encodeURIComponent(paymentMethod Type)+'&CardName='+encodeURIComponent(cName.val())+'&CardNumber='+encodeURIComponent(cNum. val())+'&CardExpiryMonth='+encodeURIComponent(expMonth)+'&CardExpiryYear='+encodeURICompon ent(expYear)+'&CardType='+encodeURIComponent(cType)+'&CardCCV='+encodeURIComponent(ccv.val ()) -
Hi All
I understand that SAP1 cannot by default email customer statements to all customers with an O/S balance at the same time. You can only do it one by one, very time consuming!
Anyone recommend an Add-On that does this price effectively?
DerekDerek,
Please look at our CrystalWave addon. It is a SAP Certified Integration for both v2005 and v2007. In addition to letting you mass email customer statements, it allows you to mass deliver any Business One Marketing document or from Business One form or SDK form. Plus it will create an Activity recording the delivery with the attached document. This is just a small amount of the available functionality that CrystalWave provides.
CrystalWave is one of seven add-ons that Third Wave has created. At this point, 5 of our add-ons are SAP Certified applications that ensure that they meet SAP's standards and will work well with other SSP addons. Our addon's have been implemented with over 40 different SSP's add-ons in 8 different countries.
Third Wave is a SAP Gold Channel Partner and Gold SSP. We are the 2009 Winner of the Pinnacle Award for SME Global Innovation Partner.
Please contact me. I will be happy to give you a demo.
Korey Lind
Third Wave Business Systems
www.twbs.com -
Send Correspondence Customer Statement Via Email
Hi SAP Gurus,
Currently, I already succeed with user exit EXIT_RFKORIEX_001 to send customer statement (F.27) via email. The program can attached PDF Files in the email that sent by SAP.
However, the email that sent is blank without body text. Does anyone know how to put text in the email body text, e.g "please find attached customer statement" ..
Thanks
HertotoHi SAP Gurus,
Currently, I already succeed with user exit EXIT_RFKORIEX_001 to send customer statement (F.27) via email. The program can attached PDF Files in the email that sent by SAP.
However, the email that sent is blank without body text. Does anyone know how to put text in the email body text, e.g "please find attached customer statement" ..
Thanks
Hertoto -
Customer Statement and DI API Invoices
Hi,
We are running SAP Business One 2007A PL5.
We have a number of invoices that have been created by the DI API used by the Radio Beacon/SAP interface. These invoices are not appearing on the customer statement.
The only noticable difference in the OINV table is that these invoices have a data source of 'O'.
It seems the statement is not recognising invoices with a data source of 'O'.
Has anyone else experienced this issue or have a fix for it?
Also, we have some invoices that have 'A' for Auto Summary... out of interest, what is this exactly?
Thanks,
MichaelHi Michael,
I am not sure what the issue is, however, there has been quite some changes to the ageing and reconciliation functionality from version 2005 SP01 to 2007, the main change between these 2 versions is actually the ageing and the reconciliation functionality. So there might be something missing in the Invoices. Also, PL5 is a pretty early version of 2007.
Question 1 - are they appearing on the Customer Account Balance as it is opened from the BP Master Data?
For the data source 'A', I think it stands for the 'Document Generation Wizard'.
Thanks,
Jesper -
Can someone help as since downloading Lion, I have XL, Publisher and email opening up on reboot all at once, gets annoying. Can you switch these off. I am a pretty new user on Mac. Thanks
Think reset is the way to go. Settings>general>reset>erase all contents. reconnect to iTunes and set it up as a new phone, not from previous back up.
-
Mass emailing of customer statements and invoices
Hi Experts
Is there a method within SAP B1 or using an add-on whereby we can send all of our invoices for a single days business by email without needing to send each one individually? Ideally we would like to be able to do the same thing with out statements also in each case using the E_Mail field from the BP Master Data Form (field OCRD,E_Mail) as the recipient address for the email.
At the moment we are able to email individually using B1 Outlook Integration, but this can be time consuming when dealing with 250+ invoices per day.
Likewise monthly statements can be as many as 3000 and it would be great if we could mass email them using SAP B1 or appropriate add-on. Would save huge amount of time on printing, folding, stamping etc, not to mention the price of postage. Even if we needed to purchase a 3rd party add-on it would likely pay for itself within a few months seeing as 99% of our BPs now use email addresses.
Thanks in advance
JonHi Johnny,
We use a product called formscape. [http://www.bottomline.co.uk/solutions_services/formscape.html]
All output is printed to the formscape server and the output is is tested to see if each document needs emailing, faxing (zetafax) or printing. Formscape then outputs all documents the our document management system (Invu).
Works great for us.
Thanks,
Mike
Maybe you are looking for
-
A few years ago I was running out of room on my Windows laptop so I followed instructions on how to move all of the music to an external hard drive and then had all music added to the always connected external hard drive instead of the laptop. That o
-
Remote User not able to Connect Completely
Hi, not able to connect a remote user to our network. All other remote users are able to connect so I know the tunnel is up. When this user tries to connect using the cisco vpn client, I see their traffic coming through with the sh crytpo ipsec sa pe
-
Hello fellow wireheads... I've got a strange problem that may or may not be labview/NI related... We have a DAQpad 4350, connected to a W98SE system via a 15' USB cable. I know that's "long" but it is within USB specs. It's not impossible to make it
-
So my phone says there is an important software update, so I opened it and it only gives me an option to update via PC. Specifically, it says "To update via PC, go to www.nokia.com/softwareupdate. You can take full advantage of your phone's features
-
Hi. I plugged my phone into the computer yesterday, and at first the computer said something about blackberry drive not found, and I realised I hadn't put in my password for my phone to connect to the pc. Then it came up on the pc and I could open th