• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro to upload note pad (.txt) file in SAP (RR1)

Ruma

New Member
Hello,

Am using a macro to copy paste data from excel to note pad. This note pad is either saved on desktop or any share drive where the working file containing the macro is saved.

This note pad is manually uploaded in SAP currently, however now want to upload this directly y in SAP (RR1).

Could you please help me with the coding.

Current Code:
Code:
Public Sub CopyToNotepad()

Dim strPath As String: strPath = ThisWorkbook.Path & "\" & Range("E1").Value & ".txt"

Dim intFF As Integer: intFF = FreeFile()

Open strPath For Output As #intFF

Print #intFF, Join(Application.Transpose(Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row).Value), vbCrLf)

Close #intFF

End Sub
Regards,

Ruma
 

Attachments

  • Example.docx
    114.5 KB · Views: 1
Last edited by a moderator:
Hi !

Your code just create a text file …

As SAP has an import function …
So better is to ask on a specific SAP forum
how to « directly import a text file » …

Do also an easy web search on this subject, some links !
 
Back
Top