Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

split dynamic sql

Hi All,

I hve a different Requirement, i'm creating a rfc which execute the sql which is given by the client side n these r long single dynamic sql.

MY work is to write a (dynamic)code which split this sql in different small sql acc to their join combinations.

Let's take a exmple suppose i hve a long sql like

SELECT MARCMATNR marcwerks FROM MARC INNER JOIN MARD ON MARDWERKS = MARCWERKS INNER JOIN MARA ON MARCMATNR = MARAMATNR AND MARDMATNR = MARAMATNR WHERE MARCWERKS ='1000' AND MARAMATKL = '001'.

which used three tables MARA,MRAC,MARD in diff join conditions then I hve to split these in three diff sql for MARA MARC & MARD that gives same result as first one.

So wht should be keep in mind to design that issue that these splits sql gives same result as gives single one.

Regards

Anuj

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question