1

I am extracting some SAP tables using the SAP Java Connector (via RFC_READ_TABLE or similar). Is it possible to pass some kind of maxlength for some fields of a table, e.g. if we have a field with size 3750 (like PROFS in table USH04) but I only want the first 100 characters - something like LEFT(PROFS, 100) in SQL?

Thank you for your helpful response!

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
mfrerichs
  • 23
  • 1
  • 7
  • I cannot answer this question. But, have you tried asking this question at the SAP forums ? If yes, how long ago did you post a question there ? – Erran Morad Jun 09 '14 at 22:01
  • 2
    @BoratSagdiyev You want to imply that there is a website which offers better and faster answers to programming questions than Stackoverflow? **HERETIC!!!** – Philipp Jun 10 '14 at 11:22
  • @Philipp - Yakshemash ! For "closed" technologies like SAP, possibly. For everything else, stack overflow is super fast. Maybe in the future it will have a brain sensor. You get answers before you can even post the question :) Chenqui. – Erran Morad Jun 10 '14 at 23:25
  • This may not be directly solvable through the SQL code, but if using a library to execute code, [sap4j](http://sap4j.com) provides transformers that can be used to prune certain result column, as well as to enrich results if required. – sashimi Sep 17 '20 at 13:19

1 Answers1

1

Using RFC_READ_TABLE, this is not possible. You may have to write your own function module to accomplish this. (Also be aware of note 382318.)

vwegert
  • 18,371
  • 3
  • 37
  • 55