Search This Blog

Showing posts with label SAP. Show all posts
Showing posts with label SAP. Show all posts

Thursday, June 22, 2017

Adding Attachments using GOS and testing a webservice with SOAPUI

SAP Tips:
  • Make SAP import parameter for file type XSTRING
  • Pseudo code:
    • call function 'SCMS_XSTRING_TO_BINARY'
    • Use include and SWC macros to build objects for calling cl_binary_relation->create_link
    • call cl_binary_relation - create_link 
      • Example params:
        • is_object_a-instid = vendor number or custom value
        • is_object_a-typeid = LFA1 or custom value
        • is_object_a-catid = 'BO'
        • is_object_b-instid = swc_get_object_key lo_message  lv_message_key
        • is_object_b-typeid = 'MESSAGE'
        • is_object_b-catid = 'BO'
        • ip_reltype = 'ATTA'


SOAPUI tips:

  • Click on attachments tab and upload attachment
  • Use cid:notation (i.e. cid:) in the element tag
  • Double click on UNKOWN in the TYPE column and select filename
  • Use the drop down in the PART column to select the filename, the TYPE column should change to CONTENT

Change URL to httpS

References:


Note: After adding the attachment and adding the "cid" notation I had to double-click on the "UNKNOWN" type, this somehow allowed me to select the file name under the Part field.

Wednesday, February 03, 2016

Remittance Advice Split Lockbox BAI2

Delete statement:

  1. Get KUKEY from table FEBKO where EDATE = today or date of import
  2. Run program RFEBKA96; application = 0003; ID = KUKEY; delete statement

View Lockbox or Checks:
  1. Run /nFLB1; Date = date of file; execute; view other display
  2. Use payt adv number to view table AVIP where AVSID = payt advice

User exit to set split line value:
RFEBLB00->RFEBLB20->EXIT_RFEBLB20_001->ZXF01U3
e_avik-texts = 'SPLT'.
e_avik-vorgc = 500.


The actual split logic is in fm FIEB_SPLIT_LOCKBOX_ADVICE (called by RFEBLB00) on line 116. It basically selects AVIP and totals NEBTR until it gets to 500 lines. If the total is positive it checks the next line up to 500 lines etc. Basically making sure none of the advices will result in a negative amount.

Logic:
  loop at l_avip assigning <avip>.  
   l_nebtr = l_nebtr + <avip>-nebtr.  
   l_lines = l_lines + 1.  
   if l_lines = i_max_lines.  
    if l_nebtr < 0.  
     message s672(fv) raising not_possible.  
    endif.  
    clear l_lines.  
    clear l_nebtr.  
   endif.  
  endloop.  
  if l_nebtr < 0.  
   message s672(fv) raising not_possible.  
  endif.  

Thursday, December 03, 2015

Import and Export to Cluster Databases

http://wiki.scn.sap.com/wiki/display/Snippets/Import+and+Export+to+Cluster+Databases 

Export some data:
1:  REPORT zshukswe19               .  
2:  TABLES indx.  
3:  DATA: int_indx TYPE TABLE OF indx,  
4:     indxkey TYPE indx-srtfd,  
5:     wf_data(11) TYPE c VALUE 'EXPORTCHECK'.  
6:  BREAK-POINT.  
7:  *In this example we will export wf_data to INDX cluster database  
8:  *In other case we can export internal table etc also  
9:  indx-aedat = sy-datum.  
10:  indx-usera = sy-uname.  
11:  indx-pgmid = sy-repid.  
12:  *Let us define a index key (It can be a unique key also)  
13:  indxkey = 'YCHECKID39'.  
14:  EXPORT wf_data FROM wf_data TO DATABASE indx(za)  
15:    ID indxkey.  
16:  BREAK-POINT.  
Import the data exported:
1:  REPORT zshukswe20               .  
2:  TABLES indx.  
3:  DATA: int_indx TYPE TABLE OF indx,  
4:     indxkey TYPE indx-srtfd,  
5:     wf_data(11) TYPE c.  
6:  BREAK-POINT.  
7:  indxkey = 'YCHECKID39'.  
8:  IMPORT wf_data TO wf_data FROM DATABASE indx(za) ID indxkey.  
Delete values from cluster table:
1:  REPORT zshukswe21               .  
2:  TABLES indx.  
3:  DATA: int_indx TYPE TABLE OF indx,  
4:     indxkey TYPE indx-srtfd,  
5:     wf_data(11) TYPE c.  
6:  BREAK-POINT.  
7:     
8:  indxkey = 'YCHECKID39'.  
9:  DELETE FROM DATABASE indx(za) ID indxkey.  
10:  BREAK-POINT.  

Tuesday, August 06, 2013

Smartforms Page x of y

Try using (3ZC). Length 3, suppress zero, consolidate. Page: &SFSY-PAGE& of &SFSY-FORMPAGES(3ZC)&

Thursday, May 09, 2013

How to create parallel/side-by-side dynamic tables in Adobe Lifecyle

Is it possible to create parallel/side-by-side dynamic tables in Adobe Lifecyle? If so, how? Since the tables have different sizes I am running into wrapping issues with flowed western text setting and paging issues with position control. Any other ideas? Solution: I had actually tried this solution ("wrapping the tables in a position subform and setting it to auto-fit height and allow page breaks.") but it didn't work. Something to do with nested position subforms inside a flow control subform etc. So to get it to work, I set the page to be a position subform and set auto-height and allow page breaks and I unwrapped the tables so they were only "wrapped" by the page itself. http://forums.adobe.com/message/5288482#5288482